
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <link rel="canonical" href="https://blog.csdn.net/fuhanghang/article/details/84110701"/>
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    <meta name="renderer" content="webkit"/>
    <meta name="force-rendering" content="webkit"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <meta name="report" content='{"pid": "blog", "spm":"1001.2101"}'>
    <meta name="referrer" content="always">
    <meta http-equiv="Cache-Control" content="no-siteapp" /><link rel="alternate" media="handheld" href="#" />
    <meta name="shenma-site-verification" content="5a59773ab8077d4a62bf469ab966a63b_1497598848">
    <meta name="applicable-device" content="pc">
    <link  href="https://g.csdnimg.cn/static/logo/favicon32.ico"  rel="shortcut icon" type="image/x-icon" />
    <title>python语言介绍_顺其自然~专栏-CSDN博客_python</title>
    <script>
      (function(){ 
        var el = document.createElement("script"); 
        el.src = "https://s3a.pstatp.com/toutiao/push.js?1abfa13dfe74d72d41d83c86d240de427e7cac50c51ead53b2e79d40c7952a23ed7716d05b4a0f683a653eab3e214672511de2457e74e99286eb2c33f4428830"; 
        el.id = "ttzz"; 
        var s = document.getElementsByTagName("script")[0]; 
        s.parentNode.insertBefore(el, s);
      })(window)
    </script>
        <meta name="keywords" content="python">
        <meta name="csdn-baidu-search"  content='{"autorun":true,"install":true,"keyword":"python"}'>
    <meta name="description" content="Python是一种动态的、面向对象的脚本语言，最初被设计用于编写自动化脚本(shell)，随着版本的不断更新和语言新功能的添加，越来越多被用于独立的、大型项目的开发。发展历程   自从20世纪90年代初Python语言诞生至今，它已被逐渐广泛应用于系统管理任务的处理和Web编程。   Python的创始人为Guido van Rossum。1989年圣诞节...">
    <script src='//g.csdnimg.cn/tingyun/1.8.3/blog.js' type='text/javascript'></script>
        <link rel="stylesheet" type="text/css" href="https://csdnimg.cn/release/blogv2/dist/pc/css/detail_enter-abc53f1aad.min.css">
    <script type="application/ld+json">{"@context":"https://ziyuan.baidu.com/contexts/cambrian.jsonld","@id":"https://blog.csdn.net/fuhanghang/article/details/84110701","appid":"1638831770136827","pubDate":"2018-11-15T21:11:02","title":"python语言介绍_顺其自然~专栏-CSDN博客_python","upDate":"2018-11-15T21:11:02"}</script>
        <link rel="stylesheet" type="text/css" href="https://csdnimg.cn/release/blogv2/dist/pc/themesSkin/skin-ink/skin-ink-a11cfdaac3.min.css">
    <script src="https://csdnimg.cn/public/common/libs/jquery/jquery-1.9.1.min.js" type="text/javascript"></script>
    <script type="text/javascript">
        var isCorporate = false;//注释删除enterprise
        var username =  "fuhanghang";
        var skinImg = "white";
        var blog_address = "https://fuhanghang.blog.csdn.net";
        var currentUserName = "";
        var isOwner = false;
        var loginUrl = "http://passport.csdn.net/account/login?from=https://blog.csdn.net/fuhanghang/article/details/84110701";
        var blogUrl = "https://blog.csdn.net/";
        var avatar = "https://profile.csdnimg.cn/8/9/9/3_fuhanghang";
        var articleTitle = "python语言介绍";
        var articleDesc = "Python是一种动态的、面向对象的脚本语言，最初被设计用于编写自动化脚本(shell)，随着版本的不断更新和语言新功能的添加，越来越多被用于独立的、大型项目的开发。发展历程   自从20世纪90年代初Python语言诞生至今，它已被逐渐广泛应用于系统管理任务的处理和Web编程。   Python的创始人为Guido van Rossum。1989年圣诞节...";
        var articleTitles = "python语言介绍_顺其自然~专栏-CSDN博客_python";
        var nickName = "顺其自然~";
        var articleDetailUrl = "https://fuhanghang.blog.csdn.net/article/details/84110701";
        if(window.location.host.split('.').length == 3) {
            blog_address = blogUrl + username;
        }
        var skinStatus = "White";
        var blogStaticHost = "https://csdnimg.cn/release/blogv2/"
    </script>
    <script src="https://g.csdnimg.cn/??fixed-sidebar/1.1.6/fixed-sidebar.js" type="text/javascript"></script>
    <script src='//g.csdnimg.cn/common/csdn-report/report.js' type='text/javascript'></script>
    <link rel="stylesheet" type="text/css" href="https://csdnimg.cn/public/sandalstrap/1.4/css/sandalstrap.min.css">
    <style>
        .MathJax, .MathJax_Message, .MathJax_Preview{
            display: none
        }
    </style>
    <script src="https://dup.baidustatic.com/js/ds.js"></script>
</head>
<body class="nodata " style="">
        <script>
            var toolbarSearchExt = {"landingWord":["python"],"queryWord":"python","tag":["python"],"title":"python语言介绍"};
        </script>
    <script src="https://g.csdnimg.cn/common/csdn-toolbar/csdn-toolbar.js" type="text/javascript"></script>
    <script>
    (function(){
        var bp = document.createElement('script');
        var curProtocol = window.location.protocol.split(':')[0];
        if (curProtocol === 'https') {
            bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
        }
        else {
            bp.src = 'http://push.zhanzhang.baidu.com/push.js';
        }
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(bp, s);
    })();
    </script>
<link rel="stylesheet" href="https://csdnimg.cn/release/blogv2/dist/pc/css/blog_code-01256533b5.min.css">
<link rel="stylesheet" href="https://csdnimg.cn/release/blogv2/dist/mdeditor/css/editerView/chart-3456820cac.css" />
<div class="main_father clearfix d-flex justify-content-center" style="height:100%;"> 
    <div class="container clearfix" id="mainBox">
        <main>
<script type="text/javascript">
    var blogSensitiveWords = "";
    function getQueryString(name) {   
      var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象  
      var r = window.location.search.substr(1).match(reg);  //匹配目标参数
      if( r != null ) return decodeURIComponent( r[2] ); return '';   
    }
    function stripscript(s){ 
      var pattern = new RegExp("[`~!@#$^&*()=|{}':;',\\[\\].<>/?~！@#￥……&*（）——|{}【】‘；：”“'。，、？%]") 
      var rs = ""; 
      for (var i = 0; i < s.length; i++) { 
        rs = rs+s.substr(i, 1).replace(pattern, ''); 
      } 
      return rs; 
    }
    var blogHotWords = stripscript(getQueryString('utm_term')).length > 1 ? stripscript(getQueryString('utm_term')) : ''
</script>
<div class="blog-content-box">
    <div class="article-header-box">
        <div class="article-header">
            <div class="article-title-box">
                <h1 class="title-article" id="articleContentId">python语言介绍</h1>
            </div>
            <div class="article-info-box">
                <div class="article-bar-top">
                    <img class="article-type-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/original.png" alt="">
                    <div class="bar-content">
                    <a class="follow-nickName vip-name" href="https://fuhanghang.blog.csdn.net" target="_blank" rel="noopener">顺其自然~</a>
                    <span class="time">2018-11-15 21:11:02</span>
                    <img class="article-read-img article-heard-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/articleReadEyes.png" alt="">
                    <span class="read-count">12965</span>
                    <a id="blog_detail_zk_collection" class="un-collection" data-report-click='{"mod":"popu_823","spm":"1001.2101.3001.4232","ab":"new"}'>
                        <img class="article-collect-img article-heard-img un-collect-status isdefault" style="display:inline-block" src="https://csdnimg.cn/release/blogv2/dist/pc/img/tobarCollect.png" alt="">
                        <img class="article-collect-img article-heard-img collect-status isactive" style="display:none" src="https://csdnimg.cn/release/blogv2/dist/pc/img/tobarCollectionActive.png" alt="">
                        <span class="name">收藏</span>
                        <span class="get-collection">
                            307
                        </span>
                    </a>
                    </div>
                </div>
                <div class="blog-tags-box">
                    <div class="tags-box artic-tag-box">
                            <span class="label">文章标签：</span>
                                <a data-report-click='{"mod":"popu_626","spm":"1001.2101.3001.4223","strategy":"python","ab":"new"}' class="tag-link" href="https://www.csdn.net/tags/MtjaQg4sNDk0LWJsb2cO0O0O.html" target="_blank" rel="noopener">python</a>
                    </div>
                </div>
                <div class="slide-content-box">
                    <div class="article-copyright">
                        <div class="creativecommons">
                            版权声明：本文为博主原创文章，遵循<a href="http://creativecommons.org/licenses/by-sa/4.0/" target="_blank" rel="noopener"> CC 4.0 BY-SA </a>版权协议，转载请附上原文出处链接和本声明。
                        </div>
                        <div class="article-source-link">
                            本文链接：<a href="https://blog.csdn.net/fuhanghang/article/details/84110701" target="_blank">https://blog.csdn.net/fuhanghang/article/details/84110701</a>
                        </div>
                    </div>
                </div>
                <div class="operating">
                    <a class="href-article-edit slide-toggle">版权</a>
                </div>
            </div>
        </div>
    </div>
    <article class="baidu_pl">
        <div id="article_content" class="article_content clearfix">
        <link rel="stylesheet" href="https://csdnimg.cn/release/blogv2/dist/mdeditor/css/editerView/ck_htmledit_views-b5506197d8.css">
                <div id="content_views" class="htmledit_views">
                    <p>       Python是一种<strong>动态的、面向对象</strong>的<strong>脚本语言</strong>&#xff0c;<strong>最初被设计用于编写自动化脚本(shell)</strong>&#xff0c;随着版本的不断更新和语言新功能的添加&#xff0c;越来越多被用于独立的、大型项目的开发。</p> 
<h2>发展历程</h2> 
<p>       自从<span style="color:#f33b45;">20世纪90年代初</span>Python语言诞生至今&#xff0c;它已被逐渐广泛应用于<span style="color:#f33b45;"><strong>系统管理任务的处理&#xff08;shell脚本&#xff09;</strong>和</span><strong><a href="https://baike.baidu.com/item/Web/150564"><span style="color:#f33b45;">Web</span></a><span style="color:#f33b45;">编程</span></strong>。</p> 
<p>       Python的创始人为Guido van Rossum。1989年圣诞节期间&#xff0c;在<a href="https://baike.baidu.com/item/%E9%98%BF%E5%A7%86%E6%96%AF%E7%89%B9%E4%B8%B9/2259975">阿姆斯特丹</a>&#xff0c;Guido为了打发<a href="https://baike.baidu.com/item/%E5%9C%A3%E8%AF%9E%E8%8A%82/127881">圣诞节</a>的无趣&#xff0c;决心开发一个新的脚本解释程序&#xff0c;作为ABC 语言的一种继承。之所以选中Python&#xff08;大蟒蛇的意思&#xff09;作为该编程语言的名字&#xff0c;是因为他是一个叫Monty Python的喜剧团体的<a href="https://baike.baidu.com/item/%E7%88%B1%E5%A5%BD%E8%80%85">爱好者</a>。</p> 
<p>       ABC是由Guido参加设计的一种<a href="https://baike.baidu.com/item/%E6%95%99%E5%AD%A6">教学</a>语言。就Guido本人看来&#xff0c;ABC 这种语言非常优美和强大&#xff0c;是专门为非专业程序员设计的。但是ABC语言并没有成功&#xff0c;究其原因&#xff0c;Guido 认为是其非开放造成的。Guido 决心在Python 中避免这一错误。同时&#xff0c;他还想实现在ABC 中闪现过但未曾实现的东西。</p> 
<p>       就这样&#xff0c;Python在Guido手中诞生了。可以说&#xff0c;Python是从ABC发展起来&#xff0c;主要受到了Modula-3&#xff08;另一种相当优美且强大的语言&#xff0c;为小型团体所设计的&#xff09;的影响。并且结合了<a href="https://baike.baidu.com/item/Unix%20shell">Unix shell</a>和C的习惯。</p> 
<p>       Python已经成为最受欢迎的程序设计语言之一。自从2004年以后&#xff0c;python的使用率呈线性增长。2011年1月&#xff0c;它被<a href="https://baike.baidu.com/item/TIOBE">TIOBE</a>编程语言<a href="https://baike.baidu.com/item/%E6%8E%92%E8%A1%8C%E6%A6%9C/4895">排行榜</a>评为2010年度语言。</p> 
<p>       由于Python语言的<a href="https://baike.baidu.com/item/%E7%AE%80%E6%B4%81"><span style="color:#f33b45;">简洁</span></a><span style="color:#f33b45;">性、易读性以及可扩展性</span>&#xff0c;在国外用Python做<strong>科学计算</strong>的研究机构日益增多&#xff0c;一些知名大学已经采用Python来教授程序设计<a href="https://baike.baidu.com/item/%E8%AF%BE%E7%A8%8B">课程</a>。例如<a href="https://baike.baidu.com/item/%E5%8D%A1%E8%80%90%E5%9F%BA%E6%A2%85%E9%9A%86%E5%A4%A7%E5%AD%A6">卡耐基梅隆大学</a>的编程基础、麻省理工学院的计算机科学及编程导论就使用Python语言讲授。<strong>众多开源的科学计算软件包都提供了Python的调用<a href="https://baike.baidu.com/item/%E6%8E%A5%E5%8F%A3">接口</a></strong>&#xff0c;例如著名的计算机视觉库<a href="https://baike.baidu.com/item/OpenCV">OpenCV</a>、三维可视化库VTK、医学图像处理库ITK。而Python专用的科学计算扩展库就更多了&#xff0c;例如如下3个十分经典的科学计算扩展库&#xff1a;NumPy、SciPy和matplotlib&#xff0c;它们分别为Python提供了快速数组处理、数值运算以及绘图功能。因此Python语言及其众多的扩展库所构成的开发环境十分适合<a href="https://baike.baidu.com/item/%E5%B7%A5%E7%A8%8B">工程</a>技术、科研人员处理实验数据、制作图表&#xff0c;甚至开发科学计算<a href="https://baike.baidu.com/item/%E5%BA%94%E7%94%A8%E7%A8%8B%E5%BA%8F">应用程序</a>。</p> 
<p>       2018年3月&#xff0c;该语言作者在邮件列表上宣布Python 2.7将于2020年1月1日终止支持。用户如果想要在这个日期之后继续得到与Python 2.7有关的支持&#xff0c;则需要付费给商业供应商。</p> 
<p><a name="3"></a><a name="sub21087_3"></a><a name="风格"></a></p> 
<h2>风格</h2> 
<p>       Python在设计上坚持了清晰划一的风格&#xff0c;这使得Python成为一门易读、易维护&#xff0c;并且被大量用户所欢迎的、用途广泛的<a href="https://baike.baidu.com/item/%E8%AF%AD%E8%A8%80/2291095">语言</a>。</p> 
<p>       设计者开发时总的指导思想是&#xff0c;对于一个特定的问题&#xff0c;只要有一种最好的方法来解决就好了。这在由Tim Peters写的Python格言&#xff08;称为The Zen of Python&#xff09;里面表述为&#xff1a;There should be one-- and preferably only one --obvious way to do it. 这正好和<a href="https://baike.baidu.com/item/Perl">Perl</a>语言&#xff08;另一种功能类似的高级<a href="https://baike.baidu.com/item/%E5%8A%A8%E6%80%81%E8%AF%AD%E8%A8%80">动态语言</a>&#xff09;的中心思想TMTOWTDI&#xff08;There&#39;s More Than One Way To Do It&#xff09;完全相反。</p> 
<p>       <span style="color:#f33b45;">Python的作者有意的设计限制性很强的语法&#xff0c;使得不好的编程习惯&#xff08;例如</span><a href="https://baike.baidu.com/item/if%E8%AF%AD%E5%8F%A5"><span style="color:#f33b45;">if语句</span></a><span style="color:#f33b45;">的下一行不向右缩进&#xff09;都不能通过编译。其中很重要的一项就是Python的</span><a href="https://baike.baidu.com/item/%E7%BC%A9%E8%BF%9B/7337492"><span style="color:#f33b45;">缩进</span></a><span style="color:#f33b45;">规则。</span></p> 
<p>       一个和其他大多数语言&#xff08;如C&#xff09;的区别就是&#xff0c;一个模块的界限&#xff0c;完全是由<span style="color:#f33b45;">每行的首字符在这一行的位置</span>来决定的&#xff08;而C语言是用一对花括号<a href="https://baike.baidu.com/item/%7B%7D">{}</a>来明确的定出模块的边界的&#xff0c;与字符的位置毫无关系&#xff09;。这一点曾经引起过争议。因为自从C这类的语言诞生后&#xff0c;语言的语法含义与字符的排列方式分离开来&#xff0c;曾经被认为是一种程序语言的进步。不过不可否认的是&#xff0c;通过强制程序员们<a href="https://baike.baidu.com/item/%E7%BC%A9%E8%BF%9B">缩进</a>&#xff08;包括if&#xff0c;for和函数定义等所有需要使用模块的地方&#xff09;&#xff0c;Python确实使得程序更加清晰和美观。</p> 
<p><a name="4"></a><a name="sub21087_4"></a><a name="与MATLAB的对比"></a></p> 
<h2>与MATLAB的对比</h2> 
<p>       说起科学计算&#xff0c;首先会被提到的可能是<a href="https://baike.baidu.com/item/MATLAB">MATLAB</a>。然而除了MATLAB的一些专业性很强的工具箱还无法被替代之外&#xff0c;MATLAB的大部分常用功能都可以在Python世界中找到相应的扩展库。和MATLAB相比&#xff0c;用Python做科学计算有如下优点&#xff1a;</p> 
<p>● 首先&#xff0c;MATLAB是一款商用软件&#xff0c;并且价格不菲。而Python完全免费&#xff0c;众多开源的<a href="https://baike.baidu.com/item/%E7%A7%91%E5%AD%A6/10406">科学</a>计算库都提供了Python的调用接口。用户可以在任何计算机上免费安装Python及其绝大多数扩展库。</p> 
<p>● 其次&#xff0c;与MATLAB相比&#xff0c;Python是一门更易学、更严谨的程序设计语言。它能让用户编写出更易读、易维护的代码。</p> 
<p>● 最后&#xff0c;MATLAB主要专注于工程和科学计算。然而即使在计算领域&#xff0c;也经常会遇到文件管理、<a href="https://baike.baidu.com/item/%E7%95%8C%E9%9D%A2%E8%AE%BE%E8%AE%A1">界面设计</a>、<a href="https://baike.baidu.com/item/%E7%BD%91%E7%BB%9C%E9%80%9A%E4%BF%A1">网络通信</a>等各种需求。而Python有着丰富的扩展库&#xff0c;可以轻易完成各种高级任务&#xff0c;开发者可以用Python实现完整应用程序所需的各种功能。</p> 
<p><a name="5"></a><a name="sub21087_5"></a><a name="设计定位"></a></p> 
<h2>设计定位</h2> 
<p>       Python的设计哲学是“优雅”、“明确”、“简单”。因此&#xff0c;<a href="https://baike.baidu.com/item/Perl%E8%AF%AD%E8%A8%80/1346108">Perl语言</a>中“总是有多种方法来做同一件事”的理念在Python开发者中通常是难以忍受的。Python开发者的哲学是“<span style="color:#f33b45;">用一种方法&#xff0c;最好是只有一种方法来做一件事</span>”。在设计Python语言时&#xff0c;如果面临多种选择&#xff0c;Python开发者一般会拒绝花俏的语法&#xff0c;而选择明确的没有或者很少有歧义的语法。由于这种设计观念的差异&#xff0c;Python源代码通常被认为比Perl具备更好的可读性&#xff0c;并且能够支撑大规模的软件开发。这些准则被称为Python格言。在Python<a href="https://baike.baidu.com/item/%E8%A7%A3%E9%87%8A%E5%99%A8">解释器</a>内运行import this可以获得完整的列表。</p> 
<p>       Python开发人员尽量避开不成熟或者不重要的优化。一些针对非重要部位的加快运行速度的补丁通常不会被合并到Python内。所以很多人认为Python很慢。不过&#xff0c;根据二八定律&#xff0c;大多数程序对速度要求不高。在某些对运行速度要求很高的情况&#xff0c;Python设计师倾向于使用<a href="https://baike.baidu.com/item/JIT">JIT</a>技术&#xff0c;或者用使用C/C&#43;&#43;语言改写这部分程序。<strong>可用的JIT技术是<a href="https://baike.baidu.com/item/PyPy">PyPy</a></strong>。</p> 
<p>       Python是完全<a href="https://baike.baidu.com/item/%E9%9D%A2%E5%90%91%E5%AF%B9%E8%B1%A1/2262089">面向对象</a>的语言。函数、模块、数字、字符串都是对象。并且完全支持<span style="color:#f33b45;">继承、重载、派生、多继承</span>&#xff0c;有益于增强源代码的复用性。Python支持重载运算符和动态类型。相对于<a href="https://baike.baidu.com/item/Lisp/22083">Lisp</a>这种传统的函数式编程语言&#xff0c;Python对函数式设计只提供了有限的支持。有两个标准库(functools, itertools)提供了<a href="https://baike.baidu.com/item/Haskell">Haskell</a>和Standard ML中久经考验的函数式程序设计工具。</p> 
<p>       虽然Python可能被粗略地分类为“<a href="https://baike.baidu.com/item/%E8%84%9A%E6%9C%AC%E8%AF%AD%E8%A8%80">脚本语言</a>”&#xff08;script language&#xff09;&#xff0c;但实际上一些大规模软件开发计划例如<a href="https://baike.baidu.com/item/Zope">Zope</a>、<a href="https://baike.baidu.com/item/Mnet">Mnet</a>及BitTorrent&#xff0c;Google也广泛地使用它。Python的支持者较喜欢称它为一种高级动态编程语言&#xff0c;原因是“脚本语言”泛指仅作简单程序设计任务的语言&#xff0c;如shellscript、<a href="https://baike.baidu.com/item/VBScript">VBScript</a>等只能处理简单任务的编程语言&#xff0c;并不能与Python相提并论。</p> 
<p>       Python本身被设计为可扩充的。并非所有的特性和功能都集成到语言核心。<strong>Python提供了丰富的<a href="https://baike.baidu.com/item/API/10154">API</a>和工具&#xff0c;以便程序员能够轻松地使用C语言、C&#43;&#43;、Cython来编写扩充模块</strong>。<span style="color:#f33b45;"><strong>Python编译器本身也可以被集成到其它需要脚本语言的程序内</strong>。因此&#xff0c;很多人还把Python作为一种“胶水语言”&#xff08;glue language&#xff09;使用</span>。使用Python将其他语言编写的程序进行集成和封装。在Google内部的很多项目&#xff0c;例如Google Engine<strong>使用C&#43;&#43;编写性能要求极高的部分&#xff0c;然后用Python或Java/Go调用相应的模块。</strong>《<a href="https://baike.baidu.com/item/Python%E6%8A%80%E6%9C%AF%E6%89%8B%E5%86%8C">Python技术手册</a>》的作者<a href="https://baike.baidu.com/item/%E9%A9%AC%E7%89%B9%E5%88%A9">马特利</a>&#xff08;Alex Martelli&#xff09;说&#xff1a;“这很难讲&#xff0c;不过&#xff0c;2004 年&#xff0c;Python 已在<a href="https://baike.baidu.com/item/Google">Google</a> 内部使用&#xff0c;Google 召募许多 Python 高手&#xff0c;但在这之前就已决定使用Python&#xff0c;他们的目的是 Python where we can, C&#43;&#43; where we must&#xff0c;<span style="color:#f33b45;">在操控硬件的场合使用 C&#43;&#43;&#xff0c;在快速开发时候使用 Python。</span>”</p> 
<p><a name="6"></a><a name="sub21087_6"></a><a name="执行"></a></p> 
<h2>执行</h2> 
<p>       Python在执行时&#xff0c;首先会将.py文件中的<a href="https://baike.baidu.com/item/%E6%BA%90%E4%BB%A3%E7%A0%81/3969">源代码</a>编译成Python的byte code&#xff08;字节码&#xff09;&#xff0c;然后再由<span style="color:#f33b45;">Python Virtual Machine&#xff08;Python</span><a href="https://baike.baidu.com/item/%E8%99%9A%E6%8B%9F%E6%9C%BA"><span style="color:#f33b45;">虚拟机</span></a><span style="color:#f33b45;">&#xff09;</span>来执行这些编译好的byte code。这种机制的基本思想跟Java&#xff0c;.NET是一致的。然而&#xff0c;Python Virtual Machine与Java或.NET的Virtual Machine不同的是&#xff0c;Python的Virtual Machine是一种更高级的Virtual Machine。这里的高级并不是通常意义上的高级&#xff0c;不是说Python的Virtual Machine比Java或.NET的功能更强大&#xff0c;而是说和Java 或.NET相比&#xff0c;<strong><span style="color:#f33b45;">Python的Virtual Machine距离真实机器的距离更远</span></strong>。或者可以这么说&#xff0c;Python的Virtual Machine是一种抽象层次更高的Virtual Machine。</p> 
<p>       <strong>基于C的Python编译出的<a href="https://baike.baidu.com/item/%E5%AD%97%E8%8A%82%E7%A0%81">字节码</a>文件&#xff0c;通常是.pyc格式。</strong></p> 
<p>       除此之外&#xff0c;Python还可以以交互模式运行&#xff0c;比如主流操作系统Unix/Linux、Mac、Windows都可以直接在命令模式下直接运行Python交互环境。直接下达操作指令即可实现交互操作。</p> 
<p><a name="7"></a><a name="sub21087_7"></a><a name="基本语法"></a></p> 
<h2>基本语法</h2> 
<p>       Python的设计目标之一是让代码具备高度的可阅读性。它设计时尽量使用其它语言经常使用的标点符号和英文单字&#xff0c;让代码看起来整洁美观。它不像其他的静态语言如C、Pascal那样需要重复书写声明语句&#xff0c;也不像它们的语法那样经常有特殊情况和意外。</p> 
<p><a name="7_1"></a><a name="sub21087_7_1"></a><a name="缩进"></a><a name="7-1"></a></p> 
<h3>缩进</h3> 
<p><span style="color:#f33b45;">       Python开发者有意让<strong>违反了</strong></span><strong><a href="https://baike.baidu.com/item/%E7%BC%A9%E8%BF%9B/7337492"><span style="color:#f33b45;">缩进</span></a></strong><span style="color:#f33b45;"><strong>规则的程序不能通过编译</strong>&#xff0c;以此来强制程序员养成良好的编程习惯。</span>并且Python语言利用缩进表示语句块的开始和退出&#xff08;Off-side规则&#xff09;&#xff0c;而非使用花括号或者某种关键字。增加缩进表示语句块的开始&#xff0c;而减少缩进则表示语句块的退出。缩进成为了语法的一部分。例如if语句&#xff1a;</p> 
<p>python3</p> 
<pre class="has"><code class="language-python">if age&lt;21:
    print(&#34;你不能买酒。&#34;)
    print(&#34;不过你能买口香糖。&#34;)
print(&#34;这句话在if语句块的外面。&#34;)</code></pre> 
<p>根据PEP的规定&#xff0c;<span style="color:#f33b45;">必须使用<strong>4个空格</strong>来表示每级缩进</span>&#xff08;不清楚4个空格的规定如何&#xff0c;在实际编写中可以自定义空格数&#xff0c;但是要满足每级缩进间空格数相等&#xff09;。使用Tab字符和其它数目的空格虽然都可以编译通过&#xff0c;但不符合编码规范。支持Tab字符和其它数目的空格仅仅是为兼容很旧的的Python程序和某些有问题的编辑程序。</p> 
<p><a name="7_2"></a><a name="sub21087_7_2"></a><a name="控制语句"></a><a name="7-2"></a></p> 
<h3>控制语句</h3> 
<p>if语句&#xff0c;当条件成立时运行语句块。经常与else, elif(相当于else if) 配合使用。</p> 
<p>for语句&#xff0c;遍历列表、字符串、字典、集合等<a href="https://baike.baidu.com/item/%E8%BF%AD%E4%BB%A3%E5%99%A8">迭代器</a>&#xff0c;依次处理迭代器中的每个元素。&#xff08;<span style="color:#f33b45;">迭代是重复反馈过程的活动&#xff0c;其目的通常是为了逼近所需目标或结果。每一次对过程的重复称为一次“迭代”&#xff0c;而每一次迭代得到的结果会作为下一次迭代的初始值&#xff0c;<strong>更迭带入</strong>&#xff09;</span></p> 
<p>while语句&#xff0c;当条件为真时&#xff0c;循环运行语句块。</p> 
<p>try语句&#xff0c;与except,finally配合使用处理在程序运行中出现的异常情况。</p> 
<p>class语句&#xff0c;用于定义<a href="https://baike.baidu.com/item/%E7%B1%BB%E5%9E%8B/6737759">类型</a>。</p> 
<p>def语句&#xff0c;用于定义函数和类型的方法。</p> 
<p>pass语句&#xff0c;表示此行为空&#xff0c;不运行任何操作。</p> 
<p>assert语句&#xff0c;用于程序调试阶段时测试运行条件是否满足。</p> 
<p>with语句&#xff0c;<strong>Python2.6以后定义的语法&#xff0c;在一个场景中运行语句块</strong>。比如&#xff0c;运行语句块前加密&#xff0c;然后在语句块运行退出后解密。</p> 
<p>yield语句&#xff0c;在迭代器函数内使用&#xff0c;用于返回一个元素。自从Python 2.5版本以后。这个语句变成一个运算符。</p> 
<p>raise语句&#xff0c;制造一个错误。</p> 
<p>import语句&#xff0c;导入一个模块或包。</p> 
<p>from import语句&#xff0c;从包导入模块或从模块导入某个对象。</p> 
<p>import as语句&#xff0c;<strong>将导入的对象赋值给一个变量</strong>。</p> 
<p>in语句&#xff0c;判断一个对象是否在一个字符串/列表/元组里。</p> 
<p><a name="7_3"></a><a name="sub21087_7_3"></a><a name="表达式"></a><a name="7-3"></a></p> 
<h3>表达式</h3> 
<p>Python的表达式写法与C/C&#43;&#43;类似。只是在某些写法有所差别。</p> 
<p>主要的算术运算符与C/C&#43;&#43;类似。&#43;, -, *, /, //, **, ~, %分别表示加法或者取正、减法或者取负、乘法、除法、整除、乘方、取补、取余。&gt;&gt;, &lt;&lt;表示右移和左移。&amp;, |, ^表示二进制的AND, OR, XOR运算。&gt;, &lt;, &#61;&#61;, !&#61;, &lt;&#61;, &gt;&#61;用于比较两个表达式的值&#xff0c;分别表示大于、小于、等于、不等于、小于等于、大于等于。在这些运算符里面&#xff0c;~, |, ^, &amp;, &lt;&lt;, &gt;&gt;必须应用于整数。</p> 
<p>Python使用and, or, not表示逻辑运算。</p> 
<p>is, is not用于比较两个变量是否是同一个对象。in, not in用于判断一个对象是否属于另外一个对象。</p> 
<p>Python支持“列表推导式”&#xff08;list comprehension&#xff09;&#xff0c;比如计算0-9的平方和:</p> 
<pre class="has"><code class="language-python">&gt;&gt;&gt; sum(x * x for x in range(10))

285</code></pre> 
<p>Python使<strong>用lambda表示匿名函数。匿名函数体只能是表达式</strong>。比如&#xff1a;</p> 
<pre class="has"><code class="language-python">&gt;&gt;&gt; add&#61;lambda x, y : x &#43; y

&gt;&gt;&gt; add(3,2)

5</code></pre> 
<p>Python使用y if cond else x表示条件表达式。意思是当cond为真时&#xff0c;表达式的值为y&#xff0c;否则表达式的值为x。相当于C&#43;&#43;和Java里的cond?y:x。</p> 
<p>Python区分列表(list)和元组(tuple&#xff0c;<span style="color:#f33b45;">元素组合</span>)两种类型。list的写法是[1,2,3]&#xff0c;而tuple的写法是(1,2,3)。<span style="color:#f33b45;">可以改变list中的元素&#xff0c;而不能改变tuple</span>。在某些情况下&#xff0c;tuple的括号可以省略。tuple对于赋值语句有特殊的处理。因此&#xff0c;可以同时赋值给多个变量&#xff0c;比如&#xff1a;</p> 
<p>&gt;&gt;&gt; x, y&#61;1,2#同时给x,y赋值&#xff0c;最终结果&#xff1a;x&#61;1, y&#61;2</p> 
<p>特别地&#xff0c;可以使用以下这种形式来交换两个变量的值&#xff1a;</p> 
<p>&gt;&gt;&gt; x, y&#61;y, x #最终结果&#xff1a;y&#61;1, x&#61;2</p> 
<p>Python使用&#39;(单引号)和&#34;(双引号)来表示字符串。与Perl、Unix Shell语言或者Ruby、Groovy等语言不一样&#xff0c;两种符号作用相同。一般地&#xff0c;如果字符串中出现了双引号&#xff0c;就使用单引号来表示字符串;反之则使用双引号。如果都没有出现&#xff0c;就依个人喜好选择。出现在字符串中的\(反斜杠)被解释为特殊字符&#xff0c;比如\n表示换行符。表达式前加r指示Python不解释字符串中出现的\。这种写法通常用于编写正则表达式或者Windows文件路径。</p> 
<p>Python支持列表切割(list slices)&#xff0c;可以取得完整列表的一部分。支持切割操作的类型有str, bytes, list, tuple等。它的语法是...[left:right]或者...[left:right:stride]。假定nums变量的值是[1, 3, 5, 7, 8, 13, 20]&#xff0c;那么下面几个语句为真&#xff1a;</p> 
<p>nums[2:5] &#61;&#61; [5, 7, 8] 从下标为2的元素切割到下标为5的元素&#xff0c;但不包含下标为5的元素。</p> 
<p>nums[1:] &#61;&#61; [3, 5, 7, 8, 13, 20] 切割到最后一个元素。</p> 
<p>nums[:-3] &#61;&#61; [1, 3, 5, 7] 从最开始的元素一直切割到倒数第3个元素。</p> 
<p>nums[:] &#61;&#61; [1, 3, 5, 7, 8, 13, 20] 返回所有元素。改变新的列表不会影响到nums。</p> 
<p>nums[1:5:2] &#61;&#61; [3, 7] 从下标为1的元素切割到下标为5的元素但不包含下标为5的元素&#xff0c;且步长为2。</p> 
<p><a name="7_4"></a><a name="sub21087_7_4"></a><a name="函数"></a><a name="7-4"></a></p> 
<h3>函数</h3> 
<p>Python的函数支持递归、默认参数值、可变参数&#xff0c;但不支持函数重载。为了增强代码的可读性&#xff0c;可以在函数后书写“文档字符串”(Documentation Strings&#xff0c;或者简称docstrings)&#xff0c;用于解释函数的作用、参数的类型与意义、返回值类型与取值范围等。可以使用内置函数help()打印出函数的使用帮助。比如&#xff1a;</p> 
<pre class="has"><code class="language-python">&gt;&gt;&gt; def randint(a, b):

... &#34;Return random integer in range [a, b], including both end points.&#34;...

&gt;&gt;&gt; help(randint)

Help on function randint in module __main__:

randint(a, b)

Return random integer inrange[a, b], including both end points.</code></pre> 
<p><a name="7_5"></a><a name="sub21087_7_5"></a><a name="对象的方法"></a><a name="7-5"></a></p> 
<h3>对象的方法</h3> 
<p>对象的方法是指绑定到对象的函数。调用对象方法的语法是instance.method(arguments)。它等价于调用Class.method(instance, arguments)。当定义对象方法时&#xff0c;必须显式地定义第一个参数&#xff0c;一般该参数名都使用self&#xff0c;用于访问对象的内部数据。这里的self相当于C&#43;&#43;, Java里面的this变量&#xff0c;但是我们还可以使用任何其它合法的参数名&#xff0c;比如this 和 mine 等&#xff0c;self与C&#43;&#43;,Java里面的this不完全一样&#xff0c;它可以被看作是一个习惯性的用法&#xff0c;我们传入任何其它的合法名称都行&#xff0c;比如&#xff1a;</p> 
<pre class="has"><code class="language-python">class Fish:
    def eat(self,food):
        if food is not None:
        self.hungry&#61;False

class User:
    def__init__(myself,name):
        myself.name&#61;name

#构造Fish的实例&#xff1a;
f&#61;Fish()
#以下两种调用形式是等价的&#xff1a;
Fish.eat(f,&#34;earthworm&#34;)
f.eat(&#34;earthworm&#34;)
u&#61;User(&#39;username&#39;)
print(u.name)</code></pre> 
<p>Python认识一些以“__”开始并以“__”结束的特殊方法名&#xff0c;它们用于实现运算符重载和实现多种特殊功能。</p> 
<p><a name="7_6"></a><a name="sub21087_7_6"></a><a name="类型"></a><a name="7-6"></a></p> 
<h3>类型</h3> 
<p>Python采用动态类型系统。在编译的时候&#xff0c;Python不会检查对象是否拥有被调用的方法或者属性&#xff0c;而是直至运行时&#xff0c;才做出检查。所以操作对象时可能会抛出异常。不过&#xff0c;虽然Python采用动态类型系统&#xff0c;它同时也是强类型的。Python禁止没有明确定义的操作&#xff0c;比如数字加字符串。</p> 
<p>与其它面向对象语言一样&#xff0c;Python允许程序员定义类型。构造一个对象只需要像函数一样调用类型即可&#xff0c;比如&#xff0c;对于前面定义的Fish类型&#xff0c;使用Fish()。类型本身也是特殊类型type的对象(type类型本身也是type对象)&#xff0c;这种特殊的设计允许对类型进行反射编程。</p> 
<p>Python内置丰富的数据类型。与Java、C&#43;&#43;相比&#xff0c;这些数据类型有效地减少代码的长度。下面这个列表简要地描述了Python内置数据类型(适用于Python 3.x)&#xff1a;</p> 
<table><tbody><tr><th> <p>类型</p> </th><th> <p>描述</p> </th><th> <p>例子</p> </th><th>备注</th></tr><tr><td> <p><a href="https://baike.baidu.com/item/str">str</a></p> </td><td> <p>一个由字符组成的不可更改的有序串行。</p> </td><td> <p>&#39;Wikipedia&#39;</p> <p>&#34;Wikipedia&#34;</p> <p>&#34;&#34;&#34;Spanning</p> <p>multiple</p> <p>lines&#34;&#34;&#34;</p> </td><td>在Python 3.x里&#xff0c;字符串由Unicode字符组成</td></tr><tr><td> <p>bytes</p> </td><td> <p>一个由字节组成的不可更改的有序串行。</p> </td><td> <p>b&#39;Some ASCII&#39;</p> <p>b&#34;Some ASCII&#34;</p> </td><td> </td></tr><tr><td> <p>list</p> </td><td> <p>可以包含多种类型的可改变的有序串行</p> </td><td> <p>[4.0, &#39;string&#39;, True]</p> </td><td> </td></tr><tr><td> <p>tuple</p> </td><td> <p>可以包含多种类型的不可改变的有序串行</p> </td><td> <p>(4.0, &#39;string&#39;, True)</p> </td><td> </td></tr><tr><td> <p>set, frozenset</p> </td><td> <p>与数学中集合的概念类似。无序的、每个元素唯一。</p> </td><td> <p>{4.0, &#39;string&#39;, True}</p> <p>frozenset([4.0, &#39;string&#39;, True])</p> </td><td> </td></tr><tr><td> <p>dict</p> </td><td> <p>一个可改变的由键值对组成的无序串行。</p> </td><td> <p>{&#39;key1&#39;: 1.0, 3: False}</p> </td><td> </td></tr><tr><td> <p>int</p> </td><td> <p>精度不限的整数</p> </td><td> <p>42</p> </td><td> </td></tr><tr><td> <p>float</p> </td><td> <p>浮点数。精度与系统相关。</p> </td><td> <p>3.1415927</p> </td><td> </td></tr><tr><td> <p>complex</p> </td><td> <p>复数</p> </td><td> <p>3&#43;2.7j</p> </td><td> </td></tr><tr><td> <p>bool</p> </td><td> <p>逻辑值。只有两个值&#xff1a;真、假</p> </td><td> <p>True</p> <p>False</p> </td><td> </td></tr></tbody></table>
<p>除了各种数据类型&#xff0c;Python语言还用类型来表示函数、模块、类型本身、对象的方法、编译后的Python代码、运行时信息等等。因此&#xff0c;Python具备很强的动态性。</p> 
<p><a name="7_7"></a><a name="sub21087_7_7"></a><a name="数学运算"></a><a name="7-7"></a></p> 
<h3>数学运算</h3> 
<p>Python使用与C、Java类似的运算符&#xff0c;支持整数与浮点数的数学运算。同时还支持复数运算与无穷位数&#xff08;实际受限于计算机的能力&#xff09;的整数运算。除了求绝对值函数abs()外&#xff0c;大多数数学函数处于math和cmath模块内。前者用于实数运算&#xff0c;而后者用于复数运算。使用时需要先导入它们&#xff0c;比如&#xff1a;</p> 
<p>&gt;&gt;&gt; import math</p> 
<p>&gt;&gt;&gt; print(math.sin(math.pi/2))</p> 
<p>1.0</p> 
<p>fractions模块用于支持分数运算&#xff1b;decimal模块用于支持高精度的浮点数运算。</p> 
<p>Python定义求余运行a % b的值处于开区间[0, b)内&#xff0c;如果b是负数&#xff0c;开区间变为(b, 0]。这是一个很常见的定义方式。不过其实它依赖于整除的定义。为了让方程式&#xff1a;b * (a // b) &#43; a % b &#61; a恒真&#xff0c;整除运行需要向负无穷小方向取值。比如7 // 3的结果是2&#xff0c;而(-7) // 3的结果却是-3。这个算法与其它很多编程语言不一样&#xff0c;需要注意&#xff0c;它们的整除运算会向0的方向取值。</p> 
<p>Python允许像数学的常用写法那样连着写两个比较运行符。比如a &lt; b &lt; c与a &lt; b and b &lt; c等价。C&#43;&#43;的结果与Python不一样&#xff0c;首先它会先计算a &lt; b&#xff0c;根据两者的大小获得0或者1两个值之一&#xff0c;然后再与c进行比较。</p> 
<p><a name="8"></a><a name="sub21087_8"></a><a name="帮助"></a></p> 
<h2>帮助</h2> 
<p><a name="8_1"></a><a name="sub21087_8_1"></a><a name="8-1"></a></p> 
<h3>1. 列出模块中的函数</h3> 
<p>用import导出模块后&#xff0c;可使用函数dir(m)列出模块的所有函数&#xff0c;import是导出模块的命令&#xff0c;m是模块名。<br /> 例子&#xff1a;</p> 
<pre class="has"><code class="language-python">&gt;&gt;&gt;import math    
&gt;&gt;&gt;dir(math)
[&#39;__doc__&#39;, &#39;__loader__&#39;, &#39;__name__&#39;, &#39;__package__&#39;, &#39;__spec__&#39;, &#39;acos&#39;, &#39;acosh&#39;, &#39;asin&#39;, &#39;asinh&#39;, &#39;atan&#39;, &#39;atan2&#39;, &#39;atanh&#39;, &#39;ceil&#39;, &#39;copysign&#39;, &#39;cos&#39;, &#39;cosh&#39;, &#39;degrees&#39;, &#39;e&#39;, &#39;erf&#39;, &#39;erfc&#39;, &#39;exp&#39;, &#39;expm1&#39;, &#39;fabs&#39;, &#39;factorial&#39;, &#39;floor&#39;, &#39;fmod&#39;, &#39;frexp&#39;, &#39;fsum&#39;, &#39;gamma&#39;, &#39;gcd&#39;, &#39;hypot&#39;, &#39;inf&#39;, &#39;isclose&#39;, &#39;isfinite&#39;, &#39;isinf&#39;, &#39;isnan&#39;, &#39;ldexp&#39;, &#39;lgamma&#39;, &#39;log&#39;, &#39;log10&#39;, &#39;log1p&#39;, &#39;log2&#39;, &#39;modf&#39;, &#39;nan&#39;, &#39;pi&#39;, &#39;pow&#39;, &#39;radians&#39;, &#39;sin&#39;, &#39;sinh&#39;, &#39;sqrt&#39;, &#39;tan&#39;, &#39;tanh&#39;, &#39;tau&#39;, &#39;trunc&#39;]</code></pre> 
<p>这个例子列出math模块的一些函数&#xff0c;以双下划线( _ _ )开头的名称用于较复杂的python编程。</p> 
<p><a name="8_2"></a><a name="sub21087_8_2"></a><a name="2.查看完整的python内置函数清单"></a><a name="8-2"></a></p> 
<h3>2.查看完整的python内置函数清单</h3> 
<p>查看完整的python内置函数清单&#xff0c;可在提示符后输入 &gt;&gt;&gt;dir(_ _builtins_ _)。</p> 
<p>例子&#xff1a;</p> 
<table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td> <p>1</p> <p>2</p> <p>3</p> </td><td> <p><code>&gt;&gt;&gt; </code><code>dir</code><code>(__builtins__)</code></p> <p> </p> <p><code>[</code><code>&#39;ArithmeticError&#39;</code><code>, </code><code>&#39;AssertionError&#39;</code><code>, </code><code>&#39;AttributeError&#39;</code><code>, </code><code>&#39;BaseException&#39;</code><code>, </code><code>&#39;BlockingIOError&#39;</code><code>, </code><code>&#39;BrokenPipeError&#39;</code><code>, </code><code>&#39;BufferError&#39;</code><code>, </code><code>&#39;BytesWarning&#39;</code><code>, </code><code>&#39;ChildProcessError&#39;</code><code>, </code><code>&#39;ConnectionAbortedError&#39;</code><code>, </code><code>&#39;ConnectionError&#39;</code><code>, </code><code>&#39;ConnectionRefusedError&#39;</code><code>, </code><code>&#39;ConnectionResetError&#39;</code><code>, </code><code>&#39;DeprecationWarning&#39;</code><code>, </code><code>&#39;EOFError&#39;</code><code>, </code><code>&#39;Ellipsis&#39;</code><code>, </code><code>&#39;EnvironmentError&#39;</code><code>, </code><code>&#39;Exception&#39;</code><code>, </code><code>&#39;False&#39;</code><code>, </code><code>&#39;FileExistsError&#39;</code><code>, </code><code>&#39;FileNotFoundError&#39;</code><code>, </code><code>&#39;FloatingPointError&#39;</code><code>, </code><code>&#39;FutureWarning&#39;</code><code>, </code><code>&#39;GeneratorExit&#39;</code><code>, </code><code>&#39;IOError&#39;</code><code>, </code><code>&#39;ImportError&#39;</code><code>, </code><code>&#39;ImportWarning&#39;</code><code>, </code><code>&#39;IndentationError&#39;</code><code>, </code><code>&#39;IndexError&#39;</code><code>, </code><code>&#39;InterruptedError&#39;</code><code>, </code><code>&#39;IsADirectoryError&#39;</code><code>, </code><code>&#39;KeyError&#39;</code><code>, </code><code>&#39;KeyboardInterrupt&#39;</code><code>, </code><code>&#39;LookupError&#39;</code><code>, </code><code>&#39;MemoryError&#39;</code><code>, </code><code>&#39;ModuleNotFoundError&#39;</code><code>, </code><code>&#39;NameError&#39;</code><code>, </code><code>&#39;None&#39;</code><code>, </code><code>&#39;NotADirectoryError&#39;</code><code>, </code><code>&#39;NotImplemented&#39;</code><code>, </code><code>&#39;NotImplementedError&#39;</code><code>, </code><code>&#39;OSError&#39;</code><code>, </code><code>&#39;OverflowError&#39;</code><code>, </code><code>&#39;PendingDeprecationWarning&#39;</code><code>, </code><code>&#39;PermissionError&#39;</code><code>, </code><code>&#39;ProcessLookupError&#39;</code><code>, </code><code>&#39;RecursionError&#39;</code><code>, </code><code>&#39;ReferenceError&#39;</code><code>, </code><code>&#39;ResourceWarning&#39;</code><code>, </code><code>&#39;RuntimeError&#39;</code><code>, </code><code>&#39;RuntimeWarning&#39;</code><code>, </code><code>&#39;StopAsyncIteration&#39;</code><code>, </code><code>&#39;StopIteration&#39;</code><code>, </code><code>&#39;SyntaxError&#39;</code><code>, </code><code>&#39;SyntaxWarning&#39;</code><code>, </code><code>&#39;SystemError&#39;</code><code>, </code><code>&#39;SystemExit&#39;</code><code>, </code><code>&#39;TabError&#39;</code><code>, </code><code>&#39;TimeoutError&#39;</code><code>, </code><code>&#39;True&#39;</code><code>, </code><code>&#39;TypeError&#39;</code><code>, </code><code>&#39;UnboundLocalError&#39;</code><code>, </code><code>&#39;UnicodeDecodeError&#39;</code><code>, </code><code>&#39;UnicodeEncodeError&#39;</code><code>, </code><code>&#39;UnicodeError&#39;</code><code>, </code><code>&#39;UnicodeTranslateError&#39;</code><code>, </code><code>&#39;UnicodeWarning&#39;</code><code>, </code><code>&#39;UserWarning&#39;</code><code>, </code><code>&#39;ValueError&#39;</code><code>, </code><code>&#39;Warning&#39;</code><code>, </code><code>&#39;WindowsError&#39;</code><code>, </code><code>&#39;ZeroDivisionError&#39;</code><code>, </code><code>&#39;_&#39;</code><code>, </code><code>&#39;__build_class__&#39;</code><code>, </code><code>&#39;__debug__&#39;</code><code>, </code><code>&#39;__doc__&#39;</code><code>, </code><code>&#39;__import__&#39;</code><code>, </code><code>&#39;__loader__&#39;</code><code>, </code><code>&#39;__name__&#39;</code><code>, </code><code>&#39;__package__&#39;</code><code>, </code><code>&#39;__spec__&#39;</code><code>, </code><code>&#39;abs&#39;</code><code>, </code><code>&#39;all&#39;</code><code>, </code><code>&#39;any&#39;</code><code>, </code><code>&#39;ascii&#39;</code><code>, </code><code>&#39;bin&#39;</code><code>, </code><code>&#39;bool&#39;</code><code>, </code><code>&#39;bytearray&#39;</code><code>, </code><code>&#39;bytes&#39;</code><code>, </code><code>&#39;callable&#39;</code><code>, </code><code>&#39;chr&#39;</code><code>, </code><code>&#39;classmethod&#39;</code><code>, </code><code>&#39;compile&#39;</code><code>, </code><code>&#39;complex&#39;</code><code>, </code><code>&#39;copyright&#39;</code><code>, </code><code>&#39;credits&#39;</code><code>, </code><code>&#39;delattr&#39;</code><code>, </code><code>&#39;dict&#39;</code><code>, </code><code>&#39;dir&#39;</code><code>, </code><code>&#39;divmod&#39;</code><code>, </code><code>&#39;enumerate&#39;</code><code>, </code><code>&#39;eval&#39;</code><code>, </code><code>&#39;exec&#39;</code><code>, </code><code>&#39;exit&#39;</code><code>, </code><code>&#39;filter&#39;</code><code>, </code><code>&#39;float&#39;</code><code>, </code><code>&#39;format&#39;</code><code>, </code><code>&#39;frozenset&#39;</code><code>, </code><code>&#39;getattr&#39;</code><code>, </code><code>&#39;globals&#39;</code><code>, </code><code>&#39;hasattr&#39;</code><code>, </code><code>&#39;hash&#39;</code><code>, </code><code>&#39;help&#39;</code><code>, </code><code>&#39;hex&#39;</code><code>, </code><code>&#39;id&#39;</code><code>, </code><code>&#39;input&#39;</code><code>, </code><code>&#39;int&#39;</code><code>, </code><code>&#39;isinstance&#39;</code><code>, </code><code>&#39;issubclass&#39;</code><code>, </code><code>&#39;iter&#39;</code><code>, </code><code>&#39;len&#39;</code><code>, </code><code>&#39;license&#39;</code><code>, </code><code>&#39;list&#39;</code><code>, </code><code>&#39;locals&#39;</code><code>, </code><code>&#39;map&#39;</code><code>, </code><code>&#39;max&#39;</code><code>, </code><code>&#39;memoryview&#39;</code><code>, </code><code>&#39;min&#39;</code><code>, </code><code>&#39;next&#39;</code><code>, </code><code>&#39;object&#39;</code><code>, </code><code>&#39;oct&#39;</code><code>, </code><code>&#39;open&#39;</code><code>, </code><code>&#39;ord&#39;</code><code>, </code><code>&#39;pow&#39;</code><code>, </code><code>&#39;print&#39;</code><code>, </code><code>&#39;property&#39;</code><code>, </code><code>&#39;quit&#39;</code><code>, </code><code>&#39;range&#39;</code><code>, </code><code>&#39;repr&#39;</code><code>, </code><code>&#39;reversed&#39;</code><code>, </code><code>&#39;round&#39;</code><code>, </code><code>&#39;set&#39;</code><code>, </code><code>&#39;setattr&#39;</code><code>, </code><code>&#39;slice&#39;</code><code>, </code><code>&#39;sorted&#39;</code><code>, </code><code>&#39;staticmethod&#39;</code><code>, </code><code>&#39;str&#39;</code><code>, </code><code>&#39;sum&#39;</code><code>, </code><code>&#39;super&#39;</code><code>, </code><code>&#39;tuple&#39;</code><code>, </code><code>&#39;type&#39;</code><code>, </code><code>&#39;vars&#39;</code><code>, </code><code>&#39;zip&#39;</code><code>]</code></p> </td></tr></tbody></table>
<p><a name="8_3"></a><a name="sub21087_8_3"></a><a name="8-3"></a></p> 
<h3>3. 查看某个函数的文档帮助信息</h3> 
<p>可以用函数help(函数)来查看某个函数的文档帮助信息。<br /> 例子&#xff1a;</p> 
<table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td> <p>1</p> <p>2</p> <p>3</p> <p>4</p> <p>5</p> <p>6</p> <p>7</p> <p>8</p> <p>9</p> </td><td> <p><code>&gt;&gt;&gt;</code><code>help</code><code>(</code><code>sum</code><code>)</code></p> <p> </p> <p><code>Help</code> <code>on built</code><code>-</code><code>in</code> <code>function </code><code>sum</code> <code>in</code> <code>module builtins:</code></p> <p> </p> <p><code>sum</code><code>(iterable, start</code><code>&#61;</code><code>0</code><code>, </code><code>/</code><code>)   </code></p> <p><code>      </code> </p> <p><code>    </code><code>Return the </code><code>sum</code> <code>of a </code><code>&#39;start&#39;</code> <code>value (default: </code><code>0</code><code>) plus an iterable of numbers      When the iterable </code><code>is</code> <code>empty, </code><code>return</code> <code>the start value.    </code></p> <p><code>      </code> </p> <p><code>    </code><code>This function </code><code>is</code> <code>intended specifically </code><code>for</code> <code>use with numeric values </code><code>and</code> <code>may    reject non</code><code>-</code><code>numeric types.</code></p> </td></tr></tbody></table>
<p>可以直接在提示符下输入help()&#xff0c;然后输入某个模块或函数名得到详细的帮助信息。</p> 
<p><a name="9"></a><a name="sub21087_9"></a><a name="CGI"></a></p> 
<h2>CGI</h2> 
<p>CGI 目前由NCSA维护&#xff0c;NCSA定义CGI如下&#xff1a;</p> 
<p>CGI(Common Gateway Interface)&#xff0c;通用网关接口&#xff0c;它是<strong>一段程序</strong>&#xff0c;运行在服务器上如&#xff1a;<span style="color:#f33b45;">HTTP服务器&#xff0c;提供同客户端HTML页面的接口</span>。</p> 
<p>CGI程序可以是Python脚本、Perl脚本、Shell脚本、C或者C&#43;&#43;程序等。</p> 
<p><a name="9_1"></a><a name="sub21087_9_1"></a><a name="服务器"></a><a name="9-1"></a></p> 
<h3>服务器</h3> 
<p>在你进行CGI编程前&#xff0c;确保您的Web服务器支持CGI及已经配置了CGI的处理程序。</p> 
<p>所有的HTTP服务器执行CGI程序都保存在一个预先配置的目录。这个目录被称为CGI目录&#xff0c;并按照惯例&#xff0c;它被命名为/var/www/cgi-bin目录。</p> 
<p>CGI文件的扩展名为.cgi&#xff0c;python也可以使用.py扩展名。</p> 
<p>默认情况下&#xff0c;Linux服务器配置运行的cgi-bin目录中为/var/www。</p> 
<p>如果想指定的其他运行CGI脚本的目录&#xff0c;可以修改httpd.conf配置文件&#xff0c;如下所示&#xff1a;</p> 
<table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td> <p>1</p> <p>2</p> <p>3</p> <p>4</p> <p>5</p> <p>6</p> <p>7</p> <p>8</p> <p>9</p> </td><td> <p><code>&lt;</code><code>Directory</code><code>&#34;/var/www/cgi-bin&#34;&gt;</code></p> <p><code>Allow Override None</code></p> <p><code>Options ExecCGI</code></p> <p><code>Order allow,deny</code></p> <p><code>Allow from all</code></p> <p><code>&lt;/</code><code>Directory</code><code>&gt;</code></p> <p><code>&lt;</code><code>Directory</code><code>&#34;/var/www/cgi-bin&#34;&gt;</code></p> <p><code>Options All</code></p> <p><code>&lt;/</code><code>Directory</code><code>&gt;</code></p> </td></tr></tbody></table>
<p><a name="9_2"></a><a name="sub21087_9_2"></a><a name="程序"></a><a name="9-2"></a></p> 
<h3>程序</h3> 
<p>使用Python创建第一个CGI程序&#xff0c;文件名为hello.py&#xff0c;文件位于/var/www/cgi-bin目录中&#xff0c;内容如下&#xff0c;修改文件的权限为755&#xff1a;</p> 
<table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td> <p>1</p> <p>2</p> <p>3</p> <p>4</p> <p>5</p> <p>6</p> <p>7</p> <p>8</p> <p>9</p> <p>10</p> </td><td> <p><code>#!/usr/bin/env python</code></p> <p><code>print</code><code>(</code><code>&#34;Content-type:text/html\r\n\r\n&#34;</code><code>)</code></p> <p><code>print</code><code>(</code><code>&#34;&lt;html&gt;&#34;</code><code>)</code></p> <p><code>print</code><code>(</code><code>&#34;&lt;head&gt;&#34;</code><code>)</code></p> <p><code>print</code><code>(&#34;&#34;)</code></p> <p><code>print</code><code>(</code><code>&#34;&lt;/head&gt;&#34;</code><code>)</code></p> <p><code>print</code><code>(</code><code>&#34;&lt;body&gt;&#34;</code><code>)</code></p> <p><code>print</code><code>(</code><code>&#34;&lt;h2&gt;Hello World! This is my first CGI program&lt;/h2&gt;&#34;</code><code>)</code></p> <p><code>print</code><code>(</code><code>&#34;&lt;/body&gt;&#34;</code><code>)</code></p> <p><code>print</code><code>(</code><code>&#34;&lt;/html&gt;&#34;</code><code>)</code></p> </td></tr></tbody></table>
<p>以上程序在浏览器访问显示结果如下&#xff1a;</p> 
<table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td> <p>1</p> </td><td> <p><code>Hello World! This </code><code>is</code> <code>my first CGI program</code></p> </td></tr></tbody></table>
<p>这个的hello.py脚本是一个简单的Python脚本&#xff0c;脚本第一的输出内容&#34;Content-type:text/html\r\n\r\n&#34;发送到浏览器并告知浏览器显示的内容类型为&#34;text/html&#34;。</p> 
<p><a name="9_3"></a><a name="sub21087_9_3"></a><a name="环境变量"></a><a name="9-3"></a></p> 
<h3>环境变量</h3> 
<p>所有的CGI程序都接收以下的环境变量&#xff0c;这些变量在CGI程序中发挥了重要的作用&#xff1a; [2] </p> 
<table><tbody><tr><th> <p>变量名</p> </th><th> <p>描述</p> </th></tr><tr><td> <p>CONTENT_TYPE</p> </td><td> <p>这个环境变量的值指示所传递来的信息的MIME类型。目前&#xff0c;环境变量CONTENT_TYPE一般都是&#xff1a;application/x-www-form-urlencoded,他表示数据来自于HTML表单。</p> </td></tr><tr><td> <p>CONTENT_LENGTH</p> </td><td> <p>如果服务器与CGI程序信息的传递方式是POST&#xff0c;这个环境变量即使从标准输入STDIN中可以读到的有效数据的字节数。这个环境变量在读取所输入的数据时必须使用。</p> </td></tr><tr><td> <p>HTTP_COOKIE</p> </td><td> <p>客户机内的 COOKIE 内容。</p> </td></tr><tr><td> <p>HTTP_USER_AGENT</p> </td><td> <p>提供包含了版本数或其他专有数据的客户浏览器信息。</p> </td></tr><tr><td> <p>PATH_INFO</p> </td><td> <p>这个环境变量的值表示紧接在CGI程序名之后的其他路径信息。它常常作为CGI程序的参数出现。</p> </td></tr><tr><td> <p>QUERY_STRING</p> </td><td> <p>如果服务器与CGI程序信息的传递方式是GET&#xff0c;这个环境变量的值即使所传递的信息。这个信息经跟在CGI程序名的后面&#xff0c;两者中间用一个问号&#39;?&#39;分隔。</p> </td></tr><tr><td> <p>REMOTE_ADDR</p> </td><td> <p>这个环境变量的值是发送请求的客户机的IP地址&#xff0c;例如上面的192.168.1.67。这个值总是存在的。而且它是Web客户机需要提供给Web服务器的唯一标识&#xff0c;可以在CGI程序中用它来区分不同的Web客户机。</p> </td></tr><tr><td> <p>REMOTE_HOST</p> </td><td> <p>这个环境变量的值包含发送CGI请求的客户机的主机名。如果不支持你想查询&#xff0c;则无需定义此环境变量。</p> </td></tr><tr><td> <p>REQUEST_METHOD</p> </td><td> <p>提供脚本被调用的方法。对于使用 HTTP/1.0 协议的脚本&#xff0c;仅 GET 和 POST 有意义。</p> </td></tr><tr><td> <p>SCRIPT_FILENAME</p> </td><td> <p>CGI脚本的完整路径</p> </td></tr><tr><td> <p>SCRIPT_NAME</p> </td><td> <p>CGI脚本的的名称</p> </td></tr><tr><td> <p>SERVER_NAME</p> </td><td> <p>这是你的 WEB 服务器的主机名、别名或IP地址。</p> </td></tr><tr><td> <p>SERVER_SOFTWARE</p> </td><td> <p>这个环境变量的值包含了调用CGI程序的HTTP服务器的名称和版本号。例如&#xff0c;上面的值为Apache/2.2.14(Unix)</p> </td></tr></tbody></table>
<p>以下是一个简单的CGI脚本输出CGI的环境变量&#xff1a;</p> 
<table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td> <p>1</p> <p>2</p> <p>3</p> <p>4</p> <p>5</p> <p>6</p> </td><td> <p><code>#!/usr/bin/python</code></p> <p><code>import</code> <code>os</code></p> <p><code>print</code><code>&#34;Content-type:text/html\r\n\r\n&#34;</code></p> <p><code>print</code><code>&#34;Environment&#34;</code></p> <p><code>for</code> <code>param </code><code>in</code> <code>os.environ.keys():</code></p> <p><code>    </code><code>print</code><code>&#34;&lt;b&gt;%20s&lt;/b&gt;:%s&lt;\br&gt;&#34;</code> <code>%</code><code>(param,os.environ[param])</code></p> </td></tr></tbody></table>
<p><a name="10"></a><a name="sub21087_10"></a><a name="特点"></a></p> 
<h2>特点</h2> 
<p><a name="10_1"></a><a name="sub21087_10_1"></a><a name="优点"></a><a name="10-1"></a></p> 
<h3>优点</h3> 
<p><strong>简单</strong>&#xff1a;Python是一种代表简单主义思想的语言。阅读一个良好的Python程序就感觉像是在读英语一样。它使你能够专注于解决问题而不是去搞明白语言本身。</p> 
<p><strong>易学</strong>&#xff1a;Python极其容易上手&#xff0c;因为Python有极其简单的说明文档。</p> 
<p><strong>速度快&#xff1a;</strong>Python 的底层是用 C 语言写的&#xff0c;很多标准库和第三方库也都是用 C 写的&#xff0c;运行速度非常快。</p> 
<p><strong>免费、开源</strong>&#xff1a;Python是<a href="https://baike.baidu.com/item/FLOSS">FLOSS</a>&#xff08;自由/<a href="https://baike.baidu.com/item/%E5%BC%80%E6%94%BE%E6%BA%90%E7%A0%81">开放源码</a>软件&#xff09;之一。使用者可以自由地发布这个软件的拷贝、阅读它的<a href="https://baike.baidu.com/item/%E6%BA%90%E4%BB%A3%E7%A0%81">源代码</a>、对它做改动、把它的一部分用于新的自由软件中。FLOSS是基于一个团体分享知识的概念。</p> 
<p><strong>高层语言</strong>&#xff1a;用Python语言编写程序的时候无需考虑诸如如何管理你的程序使用的内存一类的底层细节。</p> 
<p><strong>可移植性</strong>&#xff1a;由于它的开源本质&#xff0c;Python已经被移植在许多平台上&#xff08;经过改动使它能够工作在不同平台上&#xff09;。这些平台包括Linux、Windows、FreeBSD、Macintosh、Solaris、OS/2、Amiga、AROS、AS/400、BeOS、OS/390、z/OS、Palm OS、QNX、VMS、Psion、Acom RISC OS、VxWorks、PlayStation、Sharp Zaurus、Windows CE、PocketPC、Symbian以及Google基于linux开发的android平台。</p> 
<p><strong>解释性</strong>&#xff1a;一个用编译性语言比如C或C&#43;&#43;写的程序可以从<a href="https://baike.baidu.com/item/%E6%BA%90%E6%96%87%E4%BB%B6">源文件</a>&#xff08;即C或C&#43;&#43;语言&#xff09;转换到一个你的计算机使用的语言&#xff08;<a href="https://baike.baidu.com/item/%E4%BA%8C%E8%BF%9B%E5%88%B6%E4%BB%A3%E7%A0%81">二进制代码</a>&#xff0c;即0和1&#xff09;。这个过程通过<a href="https://baike.baidu.com/item/%E7%BC%96%E8%AF%91%E5%99%A8">编译器</a>和不同的标记、选项完成。</p> 
<p>运行程序的时候&#xff0c;连接/转载器软件把你的程序从硬盘复制到内存中并且运行。而Python语言写的程序不需要编译成二进制代码。你可以直接从<a href="https://baike.baidu.com/item/%E6%BA%90%E4%BB%A3%E7%A0%81">源代码</a>运行 程序。</p> 
<p>在计算机内部&#xff0c;Python<a href="https://baike.baidu.com/item/%E8%A7%A3%E9%87%8A%E5%99%A8">解释器</a>把源代码转换成称为<a href="https://baike.baidu.com/item/%E5%AD%97%E8%8A%82%E7%A0%81">字节码</a>的中间形式&#xff0c;然后再把它翻译成计算机使用的<a href="https://baike.baidu.com/item/%E6%9C%BA%E5%99%A8%E8%AF%AD%E8%A8%80">机器语言</a>并运行。这使得使用Python更加简单。也使得Python程序更加易于移植。</p> 
<p><a href="https://baike.baidu.com/item/%E9%9D%A2%E5%90%91%E5%AF%B9%E8%B1%A1"><strong>面向对象</strong></a>&#xff1a;Python既支持<a href="https://baike.baidu.com/item/%E9%9D%A2%E5%90%91%E8%BF%87%E7%A8%8B">面向过程</a>的编程也支持面向对象的编程。在“面向过程”的语言中&#xff0c;程序是由过程或仅仅是可重用代码的函数构建起来的。在“<a href="https://baike.baidu.com/item/%E9%9D%A2%E5%90%91%E5%AF%B9%E8%B1%A1">面向对象</a>”的语言中&#xff0c;程序是由数据和功能组合而成的对象构建起来的。</p> 
<p><span style="color:#f33b45;"><strong>可扩展性</strong>&#xff1a;如果需要一段关键代码运行得更快或者希望某些算法不公开&#xff0c;可以部分程序用C或C&#43;&#43;编写&#xff0c;然后在Python程序中使用它们。</span></p> 
<p><span style="color:#f33b45;"><strong>可嵌入性</strong>&#xff1a;可以把Python嵌入C/C&#43;&#43;程序&#xff0c;从而向程序用户提供脚本功能。</span></p> 
<p><strong>丰富的库</strong>&#xff1a;Python标准库确实很庞大。它可以帮助处理各种工作&#xff0c;包括<a href="https://baike.baidu.com/item/%E6%AD%A3%E5%88%99%E8%A1%A8%E8%BE%BE%E5%BC%8F">正则表达式</a>、文档生成、<a href="https://baike.baidu.com/item/%E5%8D%95%E5%85%83%E6%B5%8B%E8%AF%95">单元测试</a>、<a href="https://baike.baidu.com/item/%E7%BA%BF%E7%A8%8B">线程</a>、数据库、网页浏览器、CGI、FTP、电子邮件、XML、XML-RPC、HTML、WAV文件、密码系统、GUI&#xff08;<a href="https://baike.baidu.com/item/%E5%9B%BE%E5%BD%A2%E7%94%A8%E6%88%B7%E7%95%8C%E9%9D%A2">图形用户界面</a>&#xff09;、Tk和其他与系统有关的操作。这被称作Python的“功能齐全”理念。除了标准库以外&#xff0c;还有许多其他高质量的库&#xff0c;如wxPython、Twisted和Python图像库等等。</p> 
<p>规范的代码&#xff1a;Python采用强制缩进的方式使得代码具有较好可读性。而Python语言写的程序不需要编译成二进制代码。</p> 
<p><a name="10_2"></a><a name="sub21087_10_2"></a><a name="缺点"></a><a name="10-2"></a></p> 
<h3>缺点</h3> 
<p><strong>单行语句和<a href="https://baike.baidu.com/item/%E5%91%BD%E4%BB%A4%E8%A1%8C">命令行</a>输出问题</strong>&#xff1a;很多时候不能将程序连写成一行&#xff0c;如import sys;for i in sys.path:print i。而perl和awk就无此限制&#xff0c;可以较为方便的在shell下完成简单程序&#xff0c;不需要如Python一样&#xff0c;必须将程序写入一个.py文件。</p> 
<p><strong>独特的语法</strong></p> 
<p>这也许不应该被称为局限&#xff0c;但是它用缩进来区分语句关系的方式还是给很多初学者带来了困惑。即便是很有经验的Python程序员&#xff0c;也可能陷入陷阱当中。</p> 
<p><strong>运行速度慢</strong>&#xff1a;这里是指与C和C&#43;&#43;相比。</p> 
<p><a name="11"></a><a name="sub21087_11"></a><a name="应用"></a></p> 
<h2>应用</h2> 
<p>系统编程&#xff1a;提供<a href="https://baike.baidu.com/item/API">API</a>&#xff08;<a href="https://baike.baidu.com/item/Application%20Programming%20Interface">Application Programming Interface</a>应用程序编程接口&#xff09;&#xff0c;能方便进行系统维护和管理&#xff0c;Linux下标志性语言之一&#xff0c;是很多系统管理员理想的编程工具。</p> 
<p><strong>图形处理&#xff1a;</strong>有PIL、<a href="https://baike.baidu.com/item/Tkinter">Tkinter</a>等图形库支持&#xff0c;能方便进行图形处理。</p> 
<p><strong>数学处理&#xff1a;</strong>NumPy扩展提供大量与许多标准数学库的接口。</p> 
<p><strong>文本处理&#xff1a;</strong>python提供的re模块能支持<a href="https://baike.baidu.com/item/%E6%AD%A3%E5%88%99%E8%A1%A8%E8%BE%BE%E5%BC%8F">正则表达式</a>&#xff0c;还提供<a href="https://baike.baidu.com/item/SGML">SGML</a>&#xff0c;<a href="https://baike.baidu.com/item/XML">XML</a>分析模块&#xff0c;许多程序员利用python进行XML程序的开发。</p> 
<p>数据库编程&#xff1a;程序员可通过遵循Python DB-API&#xff08;数据库<a href="https://baike.baidu.com/item/%E5%BA%94%E7%94%A8%E7%A8%8B%E5%BA%8F%E7%BC%96%E7%A8%8B%E6%8E%A5%E5%8F%A3">应用程序编程接口</a>&#xff09;规范的模块与Microsoft SQL Server&#xff0c;Oracle&#xff0c;Sybase&#xff0c;DB2&#xff0c;MySQL、SQLite等数据库通信。python自带有一个Gadfly模块&#xff0c;提供了一个完整的SQL环境。</p> 
<p><a href="https://baike.baidu.com/item/%E7%BD%91%E7%BB%9C%E7%BC%96%E7%A8%8B">网络编程</a>&#xff1a;提供丰富的模块支持sockets编程&#xff0c;能方便快速地开发<a href="https://baike.baidu.com/item/%E5%88%86%E5%B8%83%E5%BC%8F%E5%BA%94%E7%94%A8%E7%A8%8B%E5%BA%8F">分布式应用程序</a>。很多大规模软件开发计划例如<a href="https://baike.baidu.com/item/Zope">Zope</a>&#xff0c;Mnet 及<a href="https://baike.baidu.com/item/BitTorrent">BitTorrent</a>. Google都在广泛地使用它。</p> 
<p><strong>Web编程</strong>&#xff1a;应用的开发语言&#xff0c;支持最新的XML技术。</p> 
<p><strong>多媒体应用&#xff1a;</strong>Python的PyOpenGL模块封装了“OpenGL应用程序编程接口”&#xff0c;能进行二维和三维<a href="https://baike.baidu.com/item/%E5%9B%BE%E5%83%8F%E5%A4%84%E7%90%86">图像处理</a>。PyGame模块可用于编写游戏软件。</p> 
<p><strong>pymo引擎&#xff1a;</strong>PYMO全称为python memories off&#xff0c;是一款运行于Symbian S60V3,Symbian3,S60V5, Symbian3, Android系统上的AVG游戏引擎。因其基于python2.0平台开发&#xff0c;并且适用于创建<a href="https://baike.baidu.com/item/%E7%A7%8B%E4%B9%8B%E5%9B%9E%E5%BF%86">秋之回忆</a>&#xff08;<a href="https://baike.baidu.com/item/memories%20off">memories off</a>&#xff09;风格的AVG游戏&#xff0c;故命名为PYMO。</p> 
<p><strong>黑客编程&#xff1a;</strong>python有一个hack的库,内置了你熟悉的或不熟悉的函数&#xff0c;但是缺少成就感。</p> 
<p><strong>用Python写简单爬虫</strong></p> 
<p>首先&#xff0c;要通过urllib2这个Module获得对应的<a href="https://baike.baidu.com/item/HTML">HTML</a>源码。(PS:在python3.3之后urllib2已经不能再用&#xff0c;代之以urllib)</p> 
<table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td> <p>1</p> <p>2</p> <p>3</p> <p>4</p> </td><td> <p><code>import</code> <code>urllib2  </code><code>#调用urllib2  </code></p> <p><code>url</code><code>&#61;</code><code>&#39;<a href="http://www.baidu.com/s?wd&#61;cloga">http://www.baidu.com/s?wd&#61;cloga</a>&#39;</code> <code>#把等号右边的网址赋值给url</code></p> <p><code>html</code><code>&#61;</code><code>urllib2.urlopen(url).read()   </code><code>#html随意取名 等号后面的动作是打开源代码页面&#xff0c;并阅读</code></p> <p><code>print</code> <code>html </code><code>#打印</code></p> </td></tr></tbody></table>
<p>通过上面这三句就可以将URL的源码存在content变量中&#xff0c;其类型为字符型。</p> 
<p>接下来是要从这堆HTML源码中提取我们需要的内容。用Chrome查看一下对应的内容的代码&#xff08;也可以用Firefox的Firebug&#xff09;。</p> 
<p>可以看到url的信息存储在span标签中&#xff0c;要获取其中的信息可以用正则式。</p> 
<p><a name="12"></a><a name="sub21087_12"></a><a name="工具功能"></a></p> 
<h2>工具功能</h2> 
<p><strong>Tkinter</strong></p> 
<p>Python默认的图形界面接口。Tkinter是一个和Tk接口的Python模块&#xff0c;Tkinter库提供了对Tk API的接口&#xff0c;它属于Tcl/Tk的GUI工具组。</p> 
<p><a href="https://baike.baidu.com/item/PyGTK"><strong>PyGTK</strong></a></p> 
<p>用于python GUI程序开发的GTK&#43;库。GTK就是用来实现GIMP和Gnome的库。</p> 
<p><a href="https://baike.baidu.com/item/PyQt"><strong>PyQt</strong></a></p> 
<p>用于python的Qt开发库。QT就是实现了KDE环境的那个库&#xff0c;由一系列的模块组成&#xff0c;有qt, qtcanvas, qtgl, qtnetwork, qtsql, qttable, qtui and qtxml&#xff0c;包含有300个类和超过5750个的函数和方法。PyQt还支持一个叫qtext的模块&#xff0c;它包含一个QScintilla库。该库是Scintillar编辑器类的Qt接口。</p> 
<p><a href="https://baike.baidu.com/item/wxPython"><strong>wxPython</strong></a></p> 
<p>GUI编程框架&#xff0c;熟悉MFC的人会非常喜欢&#xff0c;简直是同一架构&#xff08;对于初学者或者对设计要求不高的用户来说&#xff0c;使用Boa Constructor可以方便迅速的进行wxPython的开发&#xff09;</p> 
<p><a href="https://baike.baidu.com/item/PIL"><strong>PIL</strong></a></p> 
<p>python提供强大的图形处理的能力&#xff0c;并提供广泛的图形文件格式支持&#xff0c;该库能进行图形格式的转换、打印和显示。还能进行一些图形效果的处理&#xff0c;如图形的放大、缩小和旋转等。是Python用户进行图象处理的强有力工具。</p> 
<p><strong>Psyco</strong></p> 
<p>一个Python代码加速度器&#xff0c;可使Python代码的执行速度提高到与编译语言一样的水平。</p> 
<p><strong>xmpppy</strong></p> 
<p>Jabber服务器采用开发的XMPP协议&#xff0c;Google Talk也是采用XMPP协议的IM系统。在Python中有一个xmpppy模块支持该协议。也就是说&#xff0c;我们可以通过该模块与Jabber服务器通信&#xff0c;是不是很Cool。</p> 
<p><strong>PyMedia</strong></p> 
<p>用于多媒体操作的python模块。它提供了丰富而简单的接口用于多媒体处理(wav, mp3, ogg, avi, divx, dvd, cdda etc)。可在Windows和Linux平台下使用。</p> 
<p><strong>Pmw</strong></p> 
<p>Python megawidgets&#xff0c;Python超级GUI组件集&#xff0c;一个在python中利用Tkinter模块构建的高级GUI组件&#xff0c;每个Pmw都合并了一个或多个Tkinter组件&#xff0c;以实现更有用和更复杂的功能。</p> 
<p><strong>PyXML</strong></p> 
<p>用Python解析和处理XML文档的工具包&#xff0c;包中的4DOM是完全相容于W3C DOM规范的。它包含以下内容&#xff1a;</p> 
<p>xmlproc: 一个符合规范的XML解析器。Expat: 一个快速的&#xff0c;非验证的XML解析器。还有其他和他同级别的还有 PyHtml PySGML。</p> 
<p><a href="https://baike.baidu.com/item/PyGame"><strong>PyGame</strong></a></p> 
<p>用于多媒体开发和游戏软件开发的模块。</p> 
<p><strong>PyOpenGL</strong></p> 
<p>模块封装了“OpenGL应用程序编程接口”&#xff0c;通过该模块python程序员可在程序中集成2D和3D的图形。</p> 
<p><strong>NumPy、NumArray、</strong><a href="https://baike.baidu.com/item/SAGE">SAGE</a></p> 
<p>NumArray是Python的一个扩展库&#xff0c;主要用于处理任意维数的固定类型数组&#xff0c;简单说就是一个矩阵库。它的底层代码使用C来编写&#xff0c;所以速度的优势很明显。SAGE是基于NumPy和其他几个工具所整合成的数学软件包&#xff0c;目标是取代Magma, Maple, Mathematica和Matlab 这类工具。</p> 
<p><a href="https://baike.baidu.com/item/MySQLdb"><strong>MySQLdb</strong></a></p> 
<p>用于连接MySQL数据库。还有用于zope的ZMySQLDA模块&#xff0c;通过它就可在zope中连接mysql数据库。</p> 
<p><strong>S</strong><strong>qlite3</strong></p> 
<p>用于连接sqlite数据库。<br /><strong>　　</strong></p> 
<p><strong>Python-ldap</strong></p> 
<p>提供一组面向对象的API&#xff0c;可方便地在python中访问ldap目录服务&#xff0c;它基于OpenLDAP2.x。</p> 
<p><strong>smtplib</strong></p> 
<p>发送电子邮件。</p> 
<p><strong>ftplib</strong></p> 
<p>定义了FTP类和一些方法&#xff0c;用以进行客户端的ftp编程。如果想了解ftp协议的详细内容&#xff0c;请参考RFC959。</p> 
<p><strong>PyOpenCL</strong></p> 
<p>OpenCL的Python接口&#xff0c;通过该模块可以使用GPU实现并行计算。</p> 
<p><a name="13"></a><a name="sub21087_13"></a><a name="标准库"></a></p> 
<h2>标准库</h2> 
<p><strong>Python拥有一个强大的标准库</strong>。Python语言的核心只包含数字、字符串、列表、字典、文件等常见类型和函数&#xff0c;而由Python标准库提供了系统管理、网络通信、文本处理、数据库接口、图形系统、XML处理等额外的功能。Python标准库命名接口清晰、文档良好&#xff0c;很容易学习和使用。</p> 
<p>Python社区提供了大量的第三方模块&#xff0c;使用方式与标准库类似。它们的功能无所不包&#xff0c;覆盖科学计算、Web开发、数据库接口、图形系统多个领域&#xff0c;并且大多成熟而稳定。第三方模块可以使用Python或者<a href="https://baike.baidu.com/item/C%E8%AF%AD%E8%A8%80">C语言</a>编写。<a href="https://baike.baidu.com/item/SWIG">SWIG</a>,SIP常用于将C语言编写的程序库转化为Python模块。Boost C&#43;&#43; Libraries包含了一组库&#xff0c;Boost.Python&#xff0c;使得以 Python 或 C&#43;&#43; 编写的程序能互相调用。借助于拥有基于标准库的大量工具、能够使用低级语言如C和可以作为其他库接口的C&#43;&#43;&#xff0c;Python已成为一种强大的应用于其他语言与工具之间的<a href="https://baike.baidu.com/item/%E8%83%B6%E6%B0%B4%E8%AF%AD%E8%A8%80">胶水语言</a>。</p> 
<p>Python标准库的主要功能有&#xff1a;</p> 
<p>文本处理&#xff0c;包含文本格式化、正则表达式匹配、文本差异计算与合并、Unicode支持&#xff0c;二进制数据处理等功能</p> 
<p>文件处理&#xff0c;包含文件操作、创建临时文件、文件压缩与归档、操作配置文件等功能</p> 
<p>操作系统功能&#xff0c;包含线程与进程支持、IO复用、日期与时间处理、调用系统函数、写日记(logging)等功能</p> 
<p>网络通信&#xff0c;包含网络套接字&#xff0c;SSL加密通信、异步网络通信等功能</p> 
<p>网络协议&#xff0c;支持HTTP&#xff0c;FTP&#xff0c;SMTP&#xff0c;POP&#xff0c;IMAP&#xff0c;NNTP&#xff0c;XMLRPC等多种网络协议&#xff0c;并提供了编写网络服务器的框架</p> 
<p>W3C格式支持&#xff0c;包含HTML&#xff0c;SGML&#xff0c;XML的处理。</p> 
<p>其它功能&#xff0c;包括国际化支持、数学运算、HASH、Tkinter等</p> 
<p><a name="14"></a><a name="sub21087_14"></a><a name="开发环境"></a></p> 
<h2>开发环境</h2> 
<p>●IDLE&#xff1a;Python内置IDE (随python安装包提供)</p> 
<p>●PyCharm&#xff1a;详见百度百科<a href="https://baike.baidu.com/item/PyCharm">PyCharm</a>&#xff0c;由著名的JetBrains公司开发&#xff0c;带有一整套可以帮助用户在使用Python语言开发时提高其效率的工 具&#xff0c;比如调试、语法高亮、Project管理、代码跳转、智能提示、自动完成、单元测试、版本控制。此外&#xff0c;该IDE提供了一些高级功能&#xff0c;以用于支持Django框架下的专业Web开发。</p> 
<p>●Komodo和Komodo Edit&#xff1a;后者是前者的免费精简版</p> 
<p>●Spyder&#xff1a;安装Anaconda自带的高级IDE</p> 
<p>●PythonWin&#xff1a;<a href="https://baike.baidu.com/item/ActivePython">ActivePython</a>或pywin32均提供该IDE&#xff0c;仅适用于Windows</p> 
<p>●SPE&#xff08;Stani&#39;s Python Editor&#xff09;&#xff1a;功能较多的自由软件&#xff0c;基于wxPython</p> 
<p>●Ulipad&#xff1a;功能较全的自由软件&#xff0c;基于wxPython&#xff1b;作者是中国Python高手limodou</p> 
<p>●WingIDE&#xff1a;可能是功能最全的<a href="https://baike.baidu.com/item/IDE">IDE</a>&#xff0c;但不是自由软件(教育用户和开源用户可以申请免费key)</p> 
<p>●Eric&#xff1a;基于<a href="https://baike.baidu.com/item/PyQt">PyQt</a>的自由软件&#xff0c;功能强大。全名是&#xff1a;The Eric Python IDE</p> 
<p>●DrPython</p> 
<p>●<a href="https://baike.baidu.com/item/PyScripter">PyScripter</a>&#xff1a;使用Delphi开发的轻量级的开源Python IDE&#xff0c; 支持Python2.6和3.0。</p> 
<p>●<a href="https://baike.baidu.com/item/PyPE">PyPE</a>&#xff1a;一个开源的跨平台的PythonIDE。</p> 
<p>●<a href="https://baike.baidu.com/item/bpython">bpython</a>&#xff1a; 类Unix操作系统下使用curses库开发的轻量级的Python<a href="https://baike.baidu.com/item/%E8%A7%A3%E9%87%8A%E5%99%A8">解释器</a>。语法提示功能。</p> 
<p>●eclipse &#43; pydev<a href="https://baike.baidu.com/item/%E6%8F%92%E4%BB%B6">插件</a>&#xff1a;方便调试程序</p> 
<p>●emacs&#xff1a;自带python支持&#xff0c;自动补全、refactor等功能需要插件支持</p> 
<p>●<a href="https://baike.baidu.com/item/Vim">Vim</a>: 最新7.3版编译时可以加入python支持&#xff0c;提供python代码自动提示支持</p> 
<p>●Visual Studio 2003 &#43; VisualPython&#xff1a;仅适用Windows&#xff0c;已停止维护&#xff0c;功能较差</p> 
<p>●<a href="https://baike.baidu.com/item/SlickEdit">SlickEdit</a></p> 
<p>●<strong>Visual Studio 2010 &#43; Python Tools for Visual Studio</strong></p> 
<p>●<a href="https://baike.baidu.com/item/TextMate">TextMate</a></p> 
<p>●Netbeans IDE</p> 
<p>●<a href="https://baike.baidu.com/item/Sublime">Sublime</a></p> 
<p>●ipython</p> 
<p>另外&#xff0c;诸如<a href="https://baike.baidu.com/item/Notepad%2B%2B">Notepad&#43;&#43;</a>、<a href="https://baike.baidu.com/item/EditPlus">EditPlus</a>、<a href="https://baike.baidu.com/item/UltraEdit">UltraEdit</a>等通用的程序员<a href="https://baike.baidu.com/item/%E6%96%87%E6%9C%AC%E7%BC%96%E8%BE%91%E5%99%A8">文本编辑器</a>软件也能对Python代码编辑提供一定的支持&#xff0c;比如代码自动着色、注释快捷键等&#xff0c;但是否够得上<a href="https://baike.baidu.com/item/%E9%9B%86%E6%88%90%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83">集成开发环境</a>的水平&#xff0c;尚有待评估。</p> 
<p><a name="15"></a><a name="sub21087_15"></a><a name="解释器"></a></p> 
<h2>解释器</h2> 
<p><span style="color:#f33b45;">Python是一门跨平台的脚本语言</span>&#xff0c;Python规定了一个Python语法规则&#xff0c;<strong>实现了Python语法的解释程序就成为了Python的<a href="https://baike.baidu.com/item/%E8%A7%A3%E9%87%8A%E5%99%A8">解释器</a></strong>。</p> 
<p>CPython&#xff08;<strong>C</strong>lassic<strong>Python</strong>&#xff0c;也就是原始的<strong>Python</strong>实现&#xff0c;需要区别于其他实现的时候才以CPython称呼&#xff1b;或解作<strong>C语言实现的Python</strong>&#xff09;。这是最常用的Python版本。</p> 
<p><a href="https://baike.baidu.com/item/Jython">Jython</a>&#xff08;原名<strong>JPython</strong>&#xff1b;<span style="color:#f33b45;"><strong>Java语言实现的Python</strong></span>&#xff0c;现已正式发布&#xff09;。Jython可以直接调用Java的各种函数库。</p> 
<p><a href="https://baike.baidu.com/item/PyPy"><span style="color:#f33b45;">PyPy</span></a><span style="color:#f33b45;">&#xff08;使用<strong>Python语言写的Python</strong>&#xff09;</span></p> 
<p><a href="https://baike.baidu.com/item/IronPython">IronPython</a>&#xff08;<strong>面向<a href="https://baike.baidu.com/item/.NET">.NET</a>和ECMA CLI的Python实现</strong>&#xff09;。IronPython能够直接调用.net平台的各种函数库。可以将Python程序编译成.net程序。</p> 
<p>ZhPy&#xff08;周蟒&#xff09;&#xff08;<strong>支持使用繁/简中文语句编写程序的Python语言</strong>&#xff09;</p> 
<p><a name="16"></a><a name="sub21087_16"></a><a name="著名应用"></a></p> 
<h2>著名应用</h2> 
<p><a href="https://baike.baidu.com/item/Pylons">Pylons</a>-<a href="https://baike.baidu.com/item/Web%E5%BA%94%E7%94%A8%E6%A1%86%E6%9E%B6">Web应用框架</a></p> 
<p><a href="https://baike.baidu.com/item/Zope">Zope</a>- 应用服务器</p> 
<p><a href="https://baike.baidu.com/item/Plone">Plone</a>- 内容管理系统</p> 
<p>Django- 鼓励快速开发的Web应用框架</p> 
<p><a href="https://baike.baidu.com/item/Uliweb">Uliweb</a>- 国人开发的轻量级Web框架</p> 
<p>TurboGears- 另一个Web应用快速开发框架</p> 
<p>Twisted--Python的网络应用程序框架</p> 
<p>Python Wikipedia Robot Framework- MediaWiki的机器人程序</p> 
<p>MoinMoinWiki- Python写成的<a href="https://baike.baidu.com/item/Wiki">Wiki</a>程序</p> 
<p><a href="https://baike.baidu.com/item/flask">flask</a>- Python 微Web框架</p> 
<p>tornado- 非阻塞式服务器</p> 
<p>Webpy- Python 微Web框架</p> 
<p>Bottle- Python 微Web框架</p> 
<p><a href="https://baike.baidu.com/item/EVE">EVE</a>- 网络游戏EVE大量使用Python进行开发</p> 
<p>Reddit - 社交分享网站</p> 
<p>Dropbox - 文件分享服务</p> 
<p>TurboGears - 另一个Web应用快速开发框架</p> 
<p>Fabric - 用于管理成百上千台Linux主机的程序库</p> 
<p>Trac - 使用Python编写的BUG管理系统</p> 
<p>Mailman - 使用Python编写的邮件列表软件</p> 
<p>Mezzanine - 基于Django编写的内容管理系统</p> 
<p>Blender - 以C与Python开发的开源3D绘图软件</p>
                </div>
        </div>
    </article>
</div>
<script>
    // 敏感词替换
    // replaceArticleContentWords(blogSensitiveWords,'sensitiveWords')
    // 高亮词
    // replaceArticleContentWords(blogHotWords,'hotWords')
    // 公共方法
    function replaceArticleContentWords(words,type){
      if(words){   
        var getContentViews = document.getElementById("content_views");
        var getContentTitle = document.getElementById("articleContentId");
        var contentViewsInnerHTML = getContentViews.innerHTML;
        var contentTitleInnerHTML = getContentTitle.innerHTML;
        var keyWordsJsonArr = [];
        var keyWordsArr = words.split(',');
        function repeatTimes(str, num){
            return num > 1 ? str += repeatTimes(str, --num): str;
        }
        for(var i = 0; i < keyWordsArr.length; i++){
            var keyWordsJson = {} ;
            keyWordsJson.key = keyWordsArr[i];
            if(type == 'hotWords'){
              keyWordsJson.value = '<span class="hot-words-highlight">'+keyWordsArr[i]+'</span>'
            }else if(type == 'sensitiveWords'){
              keyWordsJson.value = repeatTimes("*",keyWordsArr[i].length);
            }else {
              keyWordsJson.value = keyWordsArr[i]
            }
            keyWordsJsonArr.push(keyWordsJson);
        }
        var reg;
        for(var i = 0; i < keyWordsJsonArr.length; i++){
            var item = keyWordsJsonArr[i]; 
            if(type == 'hotWords'){
              reg = new RegExp(item.key,"ig");
            }
            if(type == 'sensitiveWords'){
              reg = new RegExp(item.key+"(?!([^<]*>)|([^<]*<\/a>))","ig");  
            }
            contentViewsInnerHTML = contentViewsInnerHTML.replace(reg,item.value);
            contentTitleInnerHTML = contentTitleInnerHTML.replace(reg,item.value);
        }
        getContentViews.innerHTML=contentViewsInnerHTML;
        getContentTitle.innerHTML=contentTitleInnerHTML;
      }
    }
</script>
<div class="more-toolbox" id="toolBarBox">
    <span id="fixedBar"></span>
    <div class="left-toolbox">
        <ul class="toolbox-list">
            <li class="tool-item tool-item-size tool-active is-like" id="is-like"><a>
            <img style="display:none;" id="is-like-imgactive-animation-like" class="animation-dom active-animation" src="https://csdnimg.cn/release/blogv2/dist/pc/img/tobarThumbUpactive.png" alt="">
            <img class="isactive" style="display:none" id="is-like-imgactive" src="https://csdnimg.cn/release/blogv2/dist/pc/img/tobarThumbUpactive.png" alt="">
            <img class="isdefault" style="display:block" id="is-like-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/tobarThumbUp.png" alt="">   
            <span class="name" id="is-like-span">点赞</span>
            <span id="spanCount" class="count">
                    56
            </span>
            </a></li>
            <li class="tool-item tool-item-size tool-active tool-item-comment">
                <a href="#commentBox">
                    <img class="isdefault" src="https://csdnimg.cn/release/blogv2/dist/pc/img/tobarComment.png" alt="">
                    <img class="isactive" src="https://csdnimg.cn/release/blogv2/dist/pc/img/tobarCommentactive.png" style="display:none;" alt="">
                    <span class="name">评论</span>
                    <span class="count">
                        4
                    </span>
                </a>
            </li>
            <li class="tool-item tool-item-size tool-active tool-QRcode" id="tool-share">
                <a href="javascript:;" data-report-click='{"mod":"1582594662_002","spm":"1001.2101.3001.4129","ab":"new"}'>
                    <img class="isdefault" src="https://csdnimg.cn/release/blogv2/dist/pc/img/tobarShare.png" alt="">
                    <img class="isactive" src="https://csdnimg.cn/release/blogv2/dist/pc/img/tobarShareactive.png" style="display:none;" alt="">
                    <span class="name">分享</span>
                </a>
                <div class="QRcode" id="tool-QRcode" style="left:-92%;">
                    <span id="QRcode-close">x</span>
                    <p class="title">
                    海报分享
                    </p>
                    <div id='shareCode'></div>
                    <p>
                    扫一扫，分享海报
                    </p>
                </div>
            </li>
            <li class="tool-item tool-item-size tool-active is-collection ">
                <a href="javascript:;" data-report-click='{"mod":"popu_824","spm":"1001.2101.3001.4130","ab":"new"}'>
                    <img style="display:none" id="is-collection-img-collection" class="animation-dom active-animation" src="https://csdnimg.cn/release/blogv2/dist/pc/img/tobarCollectionActive.png" alt="">
                    <img class="isdefault" id="is-collection-img" style="display:block" src="https://csdnimg.cn/release/blogv2/dist/pc/img/tobarCollect.png" alt="">
                    <img class="isactive" id="is-collection-imgactive" style="display:none" src="https://csdnimg.cn/release/blogv2/dist/pc/img/tobarCollectionActive.png" alt="">
                    <span class="name" id="is-collection">收藏</span>
                    <span class="count get-collection" id="get-collection">
                        307
                    </span>
                </a>
            </li>
            <li class="tool-item tool-item-size tool-active tool-reward">
                <a  id="toolreward" data-report-click='{"mod":"popu_830","spm":"1001.2101.3001.4237","dest":"","ab":"new"}'>
                    <img class="isdefault" src="https://csdnimg.cn/release/blogv2/dist/pc/img/tobarReward.png" alt="">
                    <img class="isactive" src="https://csdnimg.cn/release/blogv2/dist/pc/img/tobarRewardactive.png" style="display:none;" alt="">
                    <span class="name">打赏</span>
                </a>
<div id="reward" class="reward-box">
	<p class="rewad-title">打赏<span class="reward-close"><svg t="1567152543821" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="10924" xmlns:xlink="http://www.w3.org/1999/xlink" width="12" height="12"><defs><style type="text/css"></style></defs><path d="M512 438.378667L806.506667 143.893333a52.032 52.032 0 1 1 73.6 73.621334L585.621333 512l294.485334 294.485333a52.074667 52.074667 0 0 1-73.6 73.642667L512 585.621333 217.514667 880.128a52.053333 52.053333 0 1 1-73.621334-73.642667L438.378667 512 143.893333 217.514667a52.053333 52.053333 0 1 1 73.621334-73.621334L512 438.378667z" fill="" p-id="10925"></path></svg></span></p>
	<dl>
		<dd>
		<a href="https://fuhanghang.blog.csdn.net" data-report-click='{"mod":"popu_379","dest":"https://fuhanghang.blog.csdn.net","ab":"new"}'>
			<img src="https://profile.csdnimg.cn/8/9/9/3_fuhanghang" class="avatar_pic">
		</a>
		</dd>
		<dt>
			<p class="blog-name">顺其自然~</p>
			<p class="blog-discript">你的鼓励将是我创作的最大动力</p>
		</dt>
	</dl>
	<div class="change-bt-box">
		<span class="reward-bt reward-bt-coin">C币</span>
		<span class="reward-bt-space"></span>
		<span class="reward-bt reward-bt-money reward-bt-active">余额</span>
	</div>
	<div class="money-box">
			<span class="choose_money choosed" data-id="2">2C币</span>
			<span class="choose_money " data-id="4">4C币</span>
			<span class="choose_money " data-id="6">6C币</span>
			<span class="choose_money " data-id="10">10C币</span>
			<span class="choose_money " data-id="20">20C币</span>
			<span class="choose_money " data-id="50">50C币</span>
	</div>
	<div class="sure-box">
		<p class="is-have-money"><a class="reward-sure">确定</a></p>
	</div>
</div>
            </li>
            <li class="tool-item tool-item-size tool-active tool-more">
              <a class="article-report">
                <img class="isdefault" src="https://csdnimg.cn/release/blogv2/dist/pc/img/tobarReport.png" alt="">
                <img class="isactive" src="https://csdnimg.cn/release/blogv2/dist/pc/img/tobarReportactive.png" style="display:none;" alt="">
                <span class="name">举报</span>
              </a>
            </li>
            <li class="tool-item">
                    <a class="tool-attend tool-bt-button tool-bt-attend" href="javascript:;" data-report-view='{"mod":"1592215036_002","spm":"1001.2101.3001.4232","extend1":"关注"}'>关注</a>
                <a class="tool-item-follow active-animation" style="display:none;">关注</a>
            </li>
            <li class="tool-item">
                    <p class="company active" id="health-companies" href="javascript:;" >一键三连</p>
                <span class="triplet-prompt">点赞Mark关注该博主, 随时了解TA的最新博文<img class="close-prompt" src="https://csdnimg.cn/release/blogv2/dist/pc/img/closePrompt.png"></span>
            </li>
        </ul>
        <div style="display:flex">
         </div>
         <div class="hot-word-tip-box">
          <span class="hot-word-text">已标记关键词</span>
          <span class="hot-word-count"></span> 
          <span class="hot-word-bar"></span>
          <span class="hot-word-clear">清除标记</span>
        </div>
    </div>  
</div>
<script type=text/javascript crossorigin src="https://csdnimg.cn/release/phoenix/production/qrcode-7c90a92189.min.js"></script>
<script src="//g.csdnimg.cn/??sharewx/1.2.1/sharewx.js" type="text/javascript"></script>
<script type="text/javascript" crossorigin src="https://g.csdnimg.cn/collection-box/2.0.3/collection-box.js"></script>
                <div class="first-recommend-box recommend-box">
<div class="recommend-item-box type_download clearfix" data-url="https://download.csdn.net/download/qq_43212528/10669017"  data-report-view='{"ab":"new","mod":"popu_871","extra":"{\"utm_medium\":\"distribute.pc_relevant_t0.none-task-download-BlogCommendFromMachineLearnPai2-1.control\"}","dist_request_id":"1328593.1526.16147010700267289","index":"1","strategy":"BlogCommendFromMachineLearnPai2","dest":"https://download.csdn.net/download/qq_43212528/10669017"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://download.csdn.net/download/qq_43212528/10669017" class="tit ellipsis-online ellipsis-online-1" target="_blank"  data-report-click='{"ab":"new","mod":"popu_871","extra":"{\"utm_medium\":\"distribute.pc_relevant_t0.none-task-download-BlogCommendFromMachineLearnPai2-1.control\"}","dist_request_id":"1328593.1526.16147010700267289","index":"1","strategy":"BlogCommendFromMachineLearnPai2","dest":"https://download.csdn.net/download/qq_43212528/10669017"}'  data-report-query='utm_medium=distribute.pc_relevant_t0.none-task-download-BlogCommendFromMachineLearnPai2-1.control&dist_request_id=1328593.1526.16147010700267289&depth_1-utm_source=distribute.pc_relevant_t0.none-task-download-BlogCommendFromMachineLearnPai2-1.control'>
					<em>python</em>下载
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info display-flex">
					<span class="info-block">09-15</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://download.csdn.net/download/qq_43212528/10669017" target="_blank"  data-report-click='{"ab":"new","mod":"popu_871","extra":"{\"utm_medium\":\"distribute.pc_relevant_t0.none-task-download-BlogCommendFromMachineLearnPai2-1.control\"}","dist_request_id":"1328593.1526.16147010700267289","index":"1","strategy":"BlogCommendFromMachineLearnPai2","dest":"https://download.csdn.net/download/qq_43212528/10669017"}'  data-report-query='utm_medium=distribute.pc_relevant_t0.none-task-download-BlogCommendFromMachineLearnPai2-1.control&dist_request_id=1328593.1526.16147010700267289&depth_1-utm_source=distribute.pc_relevant_t0.none-task-download-BlogCommendFromMachineLearnPai2-1.control'>
				<div class="desc ellipsis-online ellipsis-online-1"><em>python</em>下载，适用于刚开始学习<em>python</em>的同学，不会浪费太多时间</div>
			</a>
		</div>
	</div>
</div>
                </div>
            <div class="second-recommend-box recommend-box">
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/qq_25814003/article/details/80609729"  data-report-view='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-1.control\"}","dist_request_id":"1328593.1526.16147010700267289","index":"1","strategy":"BlogCommendFromMachineLearnPai2","dest":"https://blog.csdn.net/qq_25814003/article/details/80609729"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/qq_25814003/article/details/80609729" class="tit ellipsis-online ellipsis-online-1" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-1.control\"}","dist_request_id":"1328593.1526.16147010700267289","index":"1","strategy":"BlogCommendFromMachineLearnPai2","dest":"https://blog.csdn.net/qq_25814003/article/details/80609729"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-1.control&dist_request_id=1328593.1526.16147010700267289&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-1.control'>
					<em>python</em>安装教程
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/qq_25814003" target="_blank"><span class="blog-title">愤怒的懒洋洋的博客</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">06-07</span>
					<span class="info-block read"><img class="read-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					24万+
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/qq_25814003/article/details/80609729" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-1.control\"}","dist_request_id":"1328593.1526.16147010700267289","index":"1","strategy":"BlogCommendFromMachineLearnPai2","dest":"https://blog.csdn.net/qq_25814003/article/details/80609729"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-1.control&dist_request_id=1328593.1526.16147010700267289&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-1.control'>
				<div class="desc ellipsis-online ellipsis-online-1"><em>Python</em>安装教程一、博主自言随着人工智能的快速发展，<em>python</em><em>语言</em>越来越受大家的欢迎，博主前段时间先自学了一次，这次再次巩固，顺便分享给大家我遇到的坑。帮助大家学习的时候少走弯路。希望会对大家有所帮助，欢迎留言提问。PS文章底部是我的<em>python</em>3.7包下载链接，大家可以自行下载。&nbsp;二、安装环境&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 本套教程的安装环境是：win7 或者win10系统&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <em>Python</em>版本：p...</div>
			</a>
		</div>
	</div>
</div>
            </div>
<a id="commentBox" name="commentBox"></a>
<div class="comment-box">
	<div class="comment-edit-box d-flex">
		<a id="commentsedit"></a>
		<div class="user-img">
			<a href="javascript:void(0);" >
				<img class="show_loginbox" src="https://g.csdnimg.cn/static/user-img/anonymous-User-img.png">
			</a>
		</div>
		<form id="commentform">
			<img class="comment-sofa-flag" src="https://csdnimg.cn/release/blogv2/dist/pc/img/commentFlag@2x.png">
      <textarea class="comment-content" name="comment_content" id="comment_content" placeholder="优质评论可以帮助作者获得更高权重" maxlength="1000"></textarea>
			<div class="comment-emoticon"><img class="comment-emoticon-img" data-url="https://csdnimg.cn/release/blogv2/dist/pc/img/" src="https://csdnimg.cn/release/blogv2/dist/pc/img/emoticon.png" alt="表情包"></div> 
      <span class="comment-emoticon-tip">插入表情</span>
      <div class="comment-emoticon-box">
        <div class="comment-emoticon-img-box">
            <img class="emoticon-monkey-img" data-emoticon="[face]monkey2:001.png[/face]" src="https://g.csdnimg.cn/static/face/monkey2/001.png">
            <img class="emoticon-monkey-img" data-emoticon="[face]monkey2:002.png[/face]" src="https://g.csdnimg.cn/static/face/monkey2/002.png">
            <img class="emoticon-monkey-img" data-emoticon="[face]monkey2:003.png[/face]" src="https://g.csdnimg.cn/static/face/monkey2/003.png">
            <img class="emoticon-monkey-img" data-emoticon="[face]monkey2:004.png[/face]" src="https://g.csdnimg.cn/static/face/monkey2/004.png">
            <img class="emoticon-monkey-img" data-emoticon="[face]monkey2:005.png[/face]" src="https://g.csdnimg.cn/static/face/monkey2/005.png">
            <img class="emoticon-monkey-img" data-emoticon="[face]monkey2:006.png[/face]" src="https://g.csdnimg.cn/static/face/monkey2/006.png">
            <img class="emoticon-monkey-img" data-emoticon="[face]monkey2:007.png[/face]" src="https://g.csdnimg.cn/static/face/monkey2/007.png">
            <img class="emoticon-monkey-img" data-emoticon="[face]monkey2:008.png[/face]" src="https://g.csdnimg.cn/static/face/monkey2/008.png">
            <img class="emoticon-monkey-img" data-emoticon="[face]monkey2:009.png[/face]" src="https://g.csdnimg.cn/static/face/monkey2/009.png">
            <img class="emoticon-monkey-img" data-emoticon="[face]monkey2:010.png[/face]" src="https://g.csdnimg.cn/static/face/monkey2/010.png">
            <img class="emoticon-monkey-img" data-emoticon="[face]monkey2:011.png[/face]" src="https://g.csdnimg.cn/static/face/monkey2/011.png">
            <img class="emoticon-monkey-img" data-emoticon="[face]monkey2:012.png[/face]" src="https://g.csdnimg.cn/static/face/monkey2/012.png">
            <img class="emoticon-monkey-img" data-emoticon="[face]monkey2:013.png[/face]" src="https://g.csdnimg.cn/static/face/monkey2/013.png">
            <img class="emoticon-monkey-img" data-emoticon="[face]monkey2:014.png[/face]" src="https://g.csdnimg.cn/static/face/monkey2/014.png">
            <img class="emoticon-monkey-img" data-emoticon="[face]monkey2:015.png[/face]" src="https://g.csdnimg.cn/static/face/monkey2/015.png">
            <img class="emoticon-monkey-img" data-emoticon="[face]monkey2:016.png[/face]" src="https://g.csdnimg.cn/static/face/monkey2/016.png">
            <img class="emoticon-monkey-img" data-emoticon="[face]monkey2:017.png[/face]" src="https://g.csdnimg.cn/static/face/monkey2/017.png">
            <img class="emoticon-monkey-img" data-emoticon="[face]monkey2:018.png[/face]" src="https://g.csdnimg.cn/static/face/monkey2/018.png">
            <img class="emoticon-monkey-img" data-emoticon="[face]monkey2:019.png[/face]" src="https://g.csdnimg.cn/static/face/monkey2/019.png">
            <img class="emoticon-monkey-img" data-emoticon="[face]monkey2:020.png[/face]" src="https://g.csdnimg.cn/static/face/monkey2/020.png">
            <img class="emoticon-monkey-img" data-emoticon="[face]monkey2:021.png[/face]" src="https://g.csdnimg.cn/static/face/monkey2/021.png">
            <img class="emoticon-monkey-img" data-emoticon="[face]monkey2:022.png[/face]" src="https://g.csdnimg.cn/static/face/monkey2/022.png">
            <img class="emoticon-monkey-img" data-emoticon="[face]monkey2:023.png[/face]" src="https://g.csdnimg.cn/static/face/monkey2/023.png">
            <img class="emoticon-monkey-img" data-emoticon="[face]monkey2:024.png[/face]" src="https://g.csdnimg.cn/static/face/monkey2/024.png">
            <img class="emoticon-monkey-img" data-emoticon="[face]monkey2:025.png[/face]" src="https://g.csdnimg.cn/static/face/monkey2/025.png">
            <img class="emoticon-monkey-img" data-emoticon="[face]monkey2:026.png[/face]" src="https://g.csdnimg.cn/static/face/monkey2/026.png">
            <img class="emoticon-monkey-img" data-emoticon="[face]monkey2:027.png[/face]" src="https://g.csdnimg.cn/static/face/monkey2/027.png">
            <img class="emoticon-monkey-img" data-emoticon="[face]monkey2:028.png[/face]" src="https://g.csdnimg.cn/static/face/monkey2/028.png">
            <img class="emoticon-monkey-img" data-emoticon="[face]monkey2:029.png[/face]" src="https://g.csdnimg.cn/static/face/monkey2/029.png">
            <img class="emoticon-monkey-img" data-emoticon="[face]monkey2:030.png[/face]" src="https://g.csdnimg.cn/static/face/monkey2/030.png">
            <img class="emoticon-monkey-img" data-emoticon="[face]monkey2:031.png[/face]" src="https://g.csdnimg.cn/static/face/monkey2/031.png">
            <img class="emoticon-monkey-img" data-emoticon="[face]monkey2:032.png[/face]" src="https://g.csdnimg.cn/static/face/monkey2/032.png">
            <img class="emoticon-monkey-img" data-emoticon="[face]monkey2:033.png[/face]" src="https://g.csdnimg.cn/static/face/monkey2/033.png">
            <img class="emoticon-monkey-img" data-emoticon="[face]monkey2:034.png[/face]" src="https://g.csdnimg.cn/static/face/monkey2/034.png">
            <img class="emoticon-monkey-img" data-emoticon="[face]monkey2:035.png[/face]" src="https://g.csdnimg.cn/static/face/monkey2/035.png">
            <img class="emoticon-monkey-img" data-emoticon="[face]monkey2:036.png[/face]" src="https://g.csdnimg.cn/static/face/monkey2/036.png">
            <img class="emoticon-monkey-img" data-emoticon="[face]monkey2:037.png[/face]" src="https://g.csdnimg.cn/static/face/monkey2/037.png">
            <img class="emoticon-monkey-img" data-emoticon="[face]monkey2:038.png[/face]" src="https://g.csdnimg.cn/static/face/monkey2/038.png">
            <img class="emoticon-monkey-img" data-emoticon="[face]monkey2:039.png[/face]" src="https://g.csdnimg.cn/static/face/monkey2/039.png">
            <img class="emoticon-monkey-img" data-emoticon="[face]monkey2:040.png[/face]" src="https://g.csdnimg.cn/static/face/monkey2/040.png">
            <img class="emoticon-monkey-img" data-emoticon="[face]monkey2:041.png[/face]" src="https://g.csdnimg.cn/static/face/monkey2/041.png">
            <img class="emoticon-monkey-img" data-emoticon="[face]monkey2:042.png[/face]" src="https://g.csdnimg.cn/static/face/monkey2/042.png">
            <img class="emoticon-monkey-img" data-emoticon="[face]monkey2:043.png[/face]" src="https://g.csdnimg.cn/static/face/monkey2/043.png">
            <img class="emoticon-monkey-img" data-emoticon="[face]monkey2:044.png[/face]" src="https://g.csdnimg.cn/static/face/monkey2/044.png">
            <img class="emoticon-monkey-img" data-emoticon="[face]monkey2:045.png[/face]" src="https://g.csdnimg.cn/static/face/monkey2/045.png">
            <img class="emoticon-monkey-img" data-emoticon="[face]monkey2:046.png[/face]" src="https://g.csdnimg.cn/static/face/monkey2/046.png">
            <img class="emoticon-monkey-img" data-emoticon="[face]monkey2:047.png[/face]" src="https://g.csdnimg.cn/static/face/monkey2/047.png">
            <img class="emoticon-monkey-img" data-emoticon="[face]monkey2:048.png[/face]" src="https://g.csdnimg.cn/static/face/monkey2/048.png">
            <img class="emoticon-monkey-img" data-emoticon="[face]monkey2:049.png[/face]" src="https://g.csdnimg.cn/static/face/monkey2/049.png">
            <img class="emoticon-monkey-img" data-emoticon="[face]monkey2:050.png[/face]" src="https://g.csdnimg.cn/static/face/monkey2/050.png">
            <img class="emoticon-monkey-img" data-emoticon="[face]monkey2:051.png[/face]" src="https://g.csdnimg.cn/static/face/monkey2/051.png">
            <img class="emoticon-monkey-img" data-emoticon="[face]monkey2:052.png[/face]" src="https://g.csdnimg.cn/static/face/monkey2/052.png">
            <img class="emoticon-monkey-img" data-emoticon="[face]monkey2:053.png[/face]" src="https://g.csdnimg.cn/static/face/monkey2/053.png">
            <img class="emoticon-monkey-img" data-emoticon="[face]monkey2:054.png[/face]" src="https://g.csdnimg.cn/static/face/monkey2/054.png">
            <img class="emoticon-monkey-img" data-emoticon="[face]monkey2:055.png[/face]" src="https://g.csdnimg.cn/static/face/monkey2/055.png">
            <img class="emoticon-monkey-img" data-emoticon="[face]monkey2:056.png[/face]" src="https://g.csdnimg.cn/static/face/monkey2/056.png">
            <img class="emoticon-monkey-img" data-emoticon="[face]monkey2:057.png[/face]" src="https://g.csdnimg.cn/static/face/monkey2/057.png">
            <img class="emoticon-monkey-img" data-emoticon="[face]monkey2:058.png[/face]" src="https://g.csdnimg.cn/static/face/monkey2/058.png">
            <img class="emoticon-monkey-img" data-emoticon="[face]monkey2:059.png[/face]" src="https://g.csdnimg.cn/static/face/monkey2/059.png">
            <img class="emoticon-monkey-img" data-emoticon="[face]monkey2:060.png[/face]" src="https://g.csdnimg.cn/static/face/monkey2/060.png">
            <img class="emoticon-monkey-img" data-emoticon="[face]monkey2:061.png[/face]" src="https://g.csdnimg.cn/static/face/monkey2/061.png">
            <img class="emoticon-monkey-img" data-emoticon="[face]monkey2:062.png[/face]" src="https://g.csdnimg.cn/static/face/monkey2/062.png">
            <img class="emoticon-monkey-img" data-emoticon="[face]monkey2:063.png[/face]" src="https://g.csdnimg.cn/static/face/monkey2/063.png">
            <img class="emoticon-monkey-img" data-emoticon="[face]monkey2:064.png[/face]" src="https://g.csdnimg.cn/static/face/monkey2/064.png">
        </div>
      </div>
      <div class="opt-box">
				<div id="ubbtools" class="add_code">
					<a href="#insertcode" code="code" target="_self"><i class="icon iconfont icon-daima"></i></a>
				</div>
				<input type="hidden" id="comment_replyId" name="comment_replyId">
				<input type="hidden" id="article_id" name="article_id" value="84110701">
				<input type="hidden" id="comment_userId" name="comment_userId" value="">
				<input type="hidden" id="commentId" name="commentId" value="">
				<div class="dropdown" id="myDrap">
					<a class="dropdown-face d-flex align-items-center" data-toggle="dropdown" role="button"
						aria-haspopup="true" aria-expanded="false">
						<div class="txt-selected text-truncate">添加代码片</div>
						<svg class="icon d-block" width="200px" height="100.00px" viewBox="0 0 2048 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path  d="M597.33333292 298.666667h853.333334L1023.99999992 725.333333 597.33333292 298.666667z"  /></svg>
					</a>
					<ul class="dropdown-menu" id="commentCode" aria-labelledby="drop4">
						<li><a data-code="html">HTML/XML</a></li>
						<li><a data-code="objc">objective-c</a></li>
						<li><a data-code="ruby">Ruby</a></li>
						<li><a data-code="php">PHP</a></li>
						<li><a data-code="csharp">C</a></li>
						<li><a data-code="cpp">C++</a></li>
						<li><a data-code="javascript">JavaScript</a></li>
						<li><a data-code="python">Python</a></li>
						<li><a data-code="java">Java</a></li>
						<li><a data-code="css">CSS</a></li>
						<li><a data-code="sql">SQL</a></li>
						<li><a data-code="plain">其它</a></li>
					</ul>
				</div>
				<div class="right-box" id="rightBox" data-type="2">
							<span id="tip_comment" class="tip">还能输入<em>1000</em>个字符</span>
							<a data-report-click='{"mod":"1582594662_003","spm":"1001.2101.3001.4227","ab":"new"}'><input type="submit"
									class="btn btn-sm btn-comment" value="发表评论"></a>
				</div>
			</div>
		</form>
		<input type="button" class="bt-comment-show" value="评论">
	</div>
	<div class="comment-list-container">
		<a id="comments"></a>
		<div class="comment-list-box">
		</div>
		<div id="commentPage" class="pagination-box d-none"></div>
		<div class="opt-box text-center">
			<div class="btn btn-sm btn-link-blue" id="btnMoreComment"></div>
		</div>
	</div>
</div>            <div class="recommend-box insert-baidu-box">
                <div class="recommend-item-box clearfix" style="display:none"></div>
<div class="recommend-item-box type_blog clearfix" data-url="https://pig66.blog.csdn.net/article/details/88079011"  data-report-view='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-OPENSEARCH-2.control\"}","dist_request_id":"1328593.1526.16147010700267289","index":"2","strategy":"OPENSEARCH","dest":"https://pig66.blog.csdn.net/article/details/88079011"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://pig66.blog.csdn.net/article/details/88079011" class="tit ellipsis-online ellipsis-online-1" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-OPENSEARCH-2.control\"}","dist_request_id":"1328593.1526.16147010700267289","index":"2","strategy":"OPENSEARCH","dest":"https://pig66.blog.csdn.net/article/details/88079011"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-OPENSEARCH-2.control&dist_request_id=1328593.1526.16147010700267289&depth_1-utm_source=distribute.pc_relevant.none-task-blog-OPENSEARCH-2.control'>
					<em>Python</em>学习路线（2021修正版）
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/u014044812" target="_blank"><span class="blog-title">猪哥</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">03-02</span>
					<span class="info-block read"><img class="read-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					10万+
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://pig66.blog.csdn.net/article/details/88079011" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-OPENSEARCH-2.control\"}","dist_request_id":"1328593.1526.16147010700267289","index":"2","strategy":"OPENSEARCH","dest":"https://pig66.blog.csdn.net/article/details/88079011"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-OPENSEARCH-2.control&dist_request_id=1328593.1526.16147010700267289&depth_1-utm_source=distribute.pc_relevant.none-task-blog-OPENSEARCH-2.control'>
				<div class="desc ellipsis-online ellipsis-online-1">经历长达近一个月的资源筛选过程终于结束，总共1.5T的资源经过：去重、筛选、整理、归档之后一份粗略的<em>Python</em>学习曲线资源已经成型，虽然中间经历了很多坎坷，不过最终还是完成，猪哥也是第一时间与大家分享出来。
资料主要分为两部分：一、各个学习网站论坛等，二、百度云资料。网站论坛资源更新快，可以与大家互动；而百度云资源主要为视频，方便大家下载和在线观看，两种资源结合使用，学习和查找知识更方便！
一、...</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://shazhenyu.blog.csdn.net/article/details/88681429"  data-report-view='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-OPENSEARCH-3.control\"}","dist_request_id":"1328593.1526.16147010700267289","index":"3","strategy":"OPENSEARCH","dest":"https://shazhenyu.blog.csdn.net/article/details/88681429"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://shazhenyu.blog.csdn.net/article/details/88681429" class="tit ellipsis-online ellipsis-online-1" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-OPENSEARCH-3.control\"}","dist_request_id":"1328593.1526.16147010700267289","index":"3","strategy":"OPENSEARCH","dest":"https://shazhenyu.blog.csdn.net/article/details/88681429"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-OPENSEARCH-3.control&dist_request_id=1328593.1526.16147010700267289&depth_1-utm_source=distribute.pc_relevant.none-task-blog-OPENSEARCH-3.control'>
					<em>python</em>开发大全、系列文章、精品教程（转）
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/u014597198" target="_blank"><span class="blog-title">沙师弟专栏</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">03-20</span>
					<span class="info-block read"><img class="read-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					6239
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://shazhenyu.blog.csdn.net/article/details/88681429" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-OPENSEARCH-3.control\"}","dist_request_id":"1328593.1526.16147010700267289","index":"3","strategy":"OPENSEARCH","dest":"https://shazhenyu.blog.csdn.net/article/details/88681429"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-OPENSEARCH-3.control&dist_request_id=1328593.1526.16147010700267289&depth_1-utm_source=distribute.pc_relevant.none-task-blog-OPENSEARCH-3.control'>
				<div class="desc ellipsis-online ellipsis-online-1">文章目录1、简介2、分享3、<em>python</em>基础教程4、<em>python</em>应用教程5、<em>python</em>后台架构Django教程6、<em>python</em>自动化测试教程7、<em>python</em>网络爬虫教程8、<em>python</em>数据分析存储教程9、<em>python</em>可视化教程10、<em>python</em>爬虫助手11、<em>python</em>爬虫案例12、<em>python</em>机器学习算法案例13、机器学习总结14、<em>python</em>机器学习库教程15、<em>python</em>自然<em>语言</em>处理库教程...</div>
			</a>
		</div>
	</div>
</div>
		<dl id="recommend-item-box-tow" class="recommend-item-box type_blog clearfix">
			
		</dl>
<div class="recommend-item-box type_download clearfix" data-url="https://download.csdn.net/download/zzqhello2018/10634355"  data-report-view='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-download-BlogCommendFromMachineLearnPai2-4.control\"}","dist_request_id":"1328593.1526.16147010700267289","index":"4","strategy":"BlogCommendFromMachineLearnPai2","dest":"https://download.csdn.net/download/zzqhello2018/10634355"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://download.csdn.net/download/zzqhello2018/10634355" class="tit ellipsis-online ellipsis-online-1" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-download-BlogCommendFromMachineLearnPai2-4.control\"}","dist_request_id":"1328593.1526.16147010700267289","index":"4","strategy":"BlogCommendFromMachineLearnPai2","dest":"https://download.csdn.net/download/zzqhello2018/10634355"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-download-BlogCommendFromMachineLearnPai2-4.control&dist_request_id=1328593.1526.16147010700267289&depth_1-utm_source=distribute.pc_relevant.none-task-download-BlogCommendFromMachineLearnPai2-4.control'>
					<em>python</em>英语词汇
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info display-flex">
					<span class="info-block">08-29</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://download.csdn.net/download/zzqhello2018/10634355" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-download-BlogCommendFromMachineLearnPai2-4.control\"}","dist_request_id":"1328593.1526.16147010700267289","index":"4","strategy":"BlogCommendFromMachineLearnPai2","dest":"https://download.csdn.net/download/zzqhello2018/10634355"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-download-BlogCommendFromMachineLearnPai2-4.control&dist_request_id=1328593.1526.16147010700267289&depth_1-utm_source=distribute.pc_relevant.none-task-download-BlogCommendFromMachineLearnPai2-4.control'>
				<div class="desc ellipsis-online ellipsis-online-1">自己整理的<em>python</em>常用英语词汇，熟练掌握对大家的开发会有很大帮助，希望下载的朋友多多支持博客哦</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/weixin_43901038/article/details/111148821"  data-report-view='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-5.control\"}","dist_request_id":"1328593.1526.16147010700267289","index":"5","strategy":"BlogCommendFromMachineLearnPai2","dest":"https://blog.csdn.net/weixin_43901038/article/details/111148821"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/weixin_43901038/article/details/111148821" class="tit ellipsis-online ellipsis-online-1" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-5.control\"}","dist_request_id":"1328593.1526.16147010700267289","index":"5","strategy":"BlogCommendFromMachineLearnPai2","dest":"https://blog.csdn.net/weixin_43901038/article/details/111148821"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-5.control&dist_request_id=1328593.1526.16147010700267289&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-5.control'>
					<em>python</em>-模拟登陆多种方法总结
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/weixin_43901038" target="_blank"><span class="blog-title">Xor0ne</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">12-14</span>
					<span class="info-block read"><img class="read-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					351
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/weixin_43901038/article/details/111148821" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-5.control\"}","dist_request_id":"1328593.1526.16147010700267289","index":"5","strategy":"BlogCommendFromMachineLearnPai2","dest":"https://blog.csdn.net/weixin_43901038/article/details/111148821"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-5.control&dist_request_id=1328593.1526.16147010700267289&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-5.control'>
				<div class="desc ellipsis-online ellipsis-online-1"><em>python</em>-模拟登陆






环境：<em>python</em>3



一、已知cookie模拟登陆

测试网站：http://zxjf.ecjtu.edu.cn/

1.1、urllib

登陆一个网站，然后burpsuite抓包获取cookie，模拟登陆代码如下：

限制：比如测试的网站cooki是一个会话，当会话结束时，之前的cookie便过期了，此时再次模拟登陆将会失败。



#urllib.request:用于处理从 urls 接收的数据
from urllib import request
i...</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/weixin_40844416/article/details/80889165"  data-report-view='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-6.control\"}","dist_request_id":"1328593.1526.16147010700267289","index":"6","strategy":"BlogCommendFromMachineLearnPai2","dest":"https://blog.csdn.net/weixin_40844416/article/details/80889165"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/weixin_40844416/article/details/80889165" class="tit ellipsis-online ellipsis-online-1" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-6.control\"}","dist_request_id":"1328593.1526.16147010700267289","index":"6","strategy":"BlogCommendFromMachineLearnPai2","dest":"https://blog.csdn.net/weixin_40844416/article/details/80889165"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-6.control&dist_request_id=1328593.1526.16147010700267289&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-6.control'>
					<em>python</em>安装教程（Windows系统,<em>python</em>3.7为例）
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/weixin_40844416" target="_blank"><span class="blog-title">weixin_40844416的博客</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">07-02</span>
					<span class="info-block read"><img class="read-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					25万+
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/weixin_40844416/article/details/80889165" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-6.control\"}","dist_request_id":"1328593.1526.16147010700267289","index":"6","strategy":"BlogCommendFromMachineLearnPai2","dest":"https://blog.csdn.net/weixin_40844416/article/details/80889165"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-6.control&dist_request_id=1328593.1526.16147010700267289&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-6.control'>
				<div class="desc ellipsis-online ellipsis-online-1">1. 在<em>python</em>的官网下载<em>python</em>对应版本：https://www.<em>python</em>.org/downloads/windows/&nbsp;&nbsp; &nbsp; &nbsp;64位下载Windows x86-64 executable installer 版本&nbsp; &nbsp; &nbsp;32位下载Windows x86 executable installer 版本&nbsp; &nbsp; &nbsp;打开链接如下图，版本会一直更新，选择任意一个适合自己电脑的版本就好2...</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/weixin_44402559/article/details/89451075"  data-report-view='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-OPENSEARCH-7.control\"}","dist_request_id":"1328593.1526.16147010700267289","index":"7","strategy":"OPENSEARCH","dest":"https://blog.csdn.net/weixin_44402559/article/details/89451075"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/weixin_44402559/article/details/89451075" class="tit ellipsis-online ellipsis-online-1" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-OPENSEARCH-7.control\"}","dist_request_id":"1328593.1526.16147010700267289","index":"7","strategy":"OPENSEARCH","dest":"https://blog.csdn.net/weixin_44402559/article/details/89451075"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-OPENSEARCH-7.control&dist_request_id=1328593.1526.16147010700267289&depth_1-utm_source=distribute.pc_relevant.none-task-blog-OPENSEARCH-7.control'>
					<em>python</em>下载安装教程
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/weixin_44402559" target="_blank"><span class="blog-title">weixin_44402559的博客</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">04-22</span>
					<span class="info-block read"><img class="read-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					10万+
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/weixin_44402559/article/details/89451075" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-OPENSEARCH-7.control\"}","dist_request_id":"1328593.1526.16147010700267289","index":"7","strategy":"OPENSEARCH","dest":"https://blog.csdn.net/weixin_44402559/article/details/89451075"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-OPENSEARCH-7.control&dist_request_id=1328593.1526.16147010700267289&depth_1-utm_source=distribute.pc_relevant.none-task-blog-OPENSEARCH-7.control'>
				<div class="desc ellipsis-online ellipsis-online-1"><em>python</em>3.7.3下载步骤第一步：进入<em>Python</em>官网[https://www.<em>python</em>.org/](https://www.<em>python</em>.org/)第二步：点击downloads进入下载界面选择你想要的下载的版本。这里我选择的是<em>Python</em>3.7.3第三步：新建一个标签，输入网址：[https://<em>python</em>123.io/download](https://<em>python</em>123.io/d...</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/qq_36053756/article/details/95748933"  data-report-view='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-OPENSEARCH-8.control\"}","dist_request_id":"1328593.1526.16147010700267289","index":"8","strategy":"OPENSEARCH","dest":"https://blog.csdn.net/qq_36053756/article/details/95748933"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/qq_36053756/article/details/95748933" class="tit ellipsis-online ellipsis-online-1" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-OPENSEARCH-8.control\"}","dist_request_id":"1328593.1526.16147010700267289","index":"8","strategy":"OPENSEARCH","dest":"https://blog.csdn.net/qq_36053756/article/details/95748933"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-OPENSEARCH-8.control&dist_request_id=1328593.1526.16147010700267289&depth_1-utm_source=distribute.pc_relevant.none-task-blog-OPENSEARCH-8.control'>
					<em>python</em>的官网下载安装教程
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/qq_36053756" target="_blank"><span class="blog-title">qq_36053756的博客</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">07-13</span>
					<span class="info-block read"><img class="read-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					10万+
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/qq_36053756/article/details/95748933" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-OPENSEARCH-8.control\"}","dist_request_id":"1328593.1526.16147010700267289","index":"8","strategy":"OPENSEARCH","dest":"https://blog.csdn.net/qq_36053756/article/details/95748933"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-OPENSEARCH-8.control&dist_request_id=1328593.1526.16147010700267289&depth_1-utm_source=distribute.pc_relevant.none-task-blog-OPENSEARCH-8.control'>
				<div class="desc ellipsis-online ellipsis-online-1"><em>python</em>的官网下载安装教程
1、在<em>python</em>的官网下载<em>python</em>对应版本：https://www.<em>python</em>.org/downloads/windows/

打开链接如下图，版本会一直更新，选择任意一个适合自己电脑的版本就好

2、安装
1）双击运行下载好的 <em>python</em>-3.7.0.exe 文件

2）不改变默认进行Next下一步

3）选择一个自己喜欢的安装位置
 点击Install...</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://lenskit.blog.csdn.net/article/details/72847622"  data-report-view='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-OPENSEARCH-9.control\"}","dist_request_id":"1328593.1526.16147010700267289","index":"9","strategy":"OPENSEARCH","dest":"https://lenskit.blog.csdn.net/article/details/72847622"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://lenskit.blog.csdn.net/article/details/72847622" class="tit ellipsis-online ellipsis-online-1" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-OPENSEARCH-9.control\"}","dist_request_id":"1328593.1526.16147010700267289","index":"9","strategy":"OPENSEARCH","dest":"https://lenskit.blog.csdn.net/article/details/72847622"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-OPENSEARCH-9.control&dist_request_id=1328593.1526.16147010700267289&depth_1-utm_source=distribute.pc_relevant.none-task-blog-OPENSEARCH-9.control'>
					<em>python</em>&mdash;&mdash;修改Dataframe列名的两种方法
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/chenKFKevin" target="_blank"><span class="blog-title">Lenskit</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">06-02</span>
					<span class="info-block read"><img class="read-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					16万+
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://lenskit.blog.csdn.net/article/details/72847622" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-OPENSEARCH-9.control\"}","dist_request_id":"1328593.1526.16147010700267289","index":"9","strategy":"OPENSEARCH","dest":"https://lenskit.blog.csdn.net/article/details/72847622"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-OPENSEARCH-9.control&dist_request_id=1328593.1526.16147010700267289&depth_1-utm_source=distribute.pc_relevant.none-task-blog-OPENSEARCH-9.control'>
				<div class="desc ellipsis-online ellipsis-online-1">首先新建一个Dataframe
import pandas as pd
df = pd.DataFrame({&#39;a&#39;:[1,2,3],&#39;b&#39;:[1,2,3]})


如下：
 a b
0 1 1
1 2 2
2 3 3


1、修改列名a，b为A、B。
df.columns = [&#39;A&#39;,&#39;B&#39;]

2、只修改列名a为A</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/amuchena/article/details/89060798"  data-report-view='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-OPENSEARCH-10.control\"}","dist_request_id":"1328593.1526.16147010700267289","index":"10","strategy":"OPENSEARCH","dest":"https://blog.csdn.net/amuchena/article/details/89060798"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/amuchena/article/details/89060798" class="tit ellipsis-online ellipsis-online-1" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-OPENSEARCH-10.control\"}","dist_request_id":"1328593.1526.16147010700267289","index":"10","strategy":"OPENSEARCH","dest":"https://blog.csdn.net/amuchena/article/details/89060798"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-OPENSEARCH-10.control&dist_request_id=1328593.1526.16147010700267289&depth_1-utm_source=distribute.pc_relevant.none-task-blog-OPENSEARCH-10.control'>
					<em>python</em>求和函数sum()详解
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/amuchena" target="_blank"><span class="blog-title">amuchena的博客</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">04-06</span>
					<span class="info-block read"><img class="read-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					4万+
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/amuchena/article/details/89060798" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-OPENSEARCH-10.control\"}","dist_request_id":"1328593.1526.16147010700267289","index":"10","strategy":"OPENSEARCH","dest":"https://blog.csdn.net/amuchena/article/details/89060798"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-OPENSEARCH-10.control&dist_request_id=1328593.1526.16147010700267289&depth_1-utm_source=distribute.pc_relevant.none-task-blog-OPENSEARCH-10.control'>
				<div class="desc ellipsis-online ellipsis-online-1"><em>python</em>求和函数sum()详解
今天在学习的过程中，误用sum()函数，我又去查了查<em>python</em> sum()函数才恍然大悟。
我本来想算几个Int值相加的和，本以为很简单的事情，结果却很悲伤，例：
&gt;&gt;&gt;sum = sum(1,2,3)         #结果很明显出现问题报错
TypeError: sum expected at most 2 arguments, got ...</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/qq_40223983/article/details/95655470"  data-report-view='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-11.control\"}","dist_request_id":"1328593.1526.16147010700267289","index":"11","strategy":"BlogCommendFromMachineLearnPai2","dest":"https://blog.csdn.net/qq_40223983/article/details/95655470"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/qq_40223983/article/details/95655470" class="tit ellipsis-online ellipsis-online-1" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-11.control\"}","dist_request_id":"1328593.1526.16147010700267289","index":"11","strategy":"BlogCommendFromMachineLearnPai2","dest":"https://blog.csdn.net/qq_40223983/article/details/95655470"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-11.control&dist_request_id=1328593.1526.16147010700267289&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-11.control'>
					<em>python</em>安装以及版本检测
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/qq_40223983" target="_blank"><span class="blog-title">秋叶夏风的博客</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">07-12</span>
					<span class="info-block read"><img class="read-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					3130
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/qq_40223983/article/details/95655470" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-11.control\"}","dist_request_id":"1328593.1526.16147010700267289","index":"11","strategy":"BlogCommendFromMachineLearnPai2","dest":"https://blog.csdn.net/qq_40223983/article/details/95655470"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-11.control&dist_request_id=1328593.1526.16147010700267289&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-11.control'>
				<div class="desc ellipsis-online ellipsis-online-1">Windows 安装 <em>Python</em> 3
目前<em>Python</em>有两个大版本，分别是 2.X 和 3.X ，我们的教程基于最新版本 3.6.1 首先我们需要获取<em>Python</em>的安装包，可以从官网获取，如果你因为没有VPN工具而无法访问官网的话，我已经将它放在网盘了，永久有效。
从<em>Python</em>官网 or 从网盘获取

你可以根据电脑的操作系统来选择相应的版本。

双击安装，请务必将下面的add <em>python</em> ...</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/lmseo5hy/article/details/79914670"  data-report-view='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-OPENSEARCH-12.control\"}","dist_request_id":"1328593.1526.16147010700267289","index":"12","strategy":"OPENSEARCH","dest":"https://blog.csdn.net/lmseo5hy/article/details/79914670"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/lmseo5hy/article/details/79914670" class="tit ellipsis-online ellipsis-online-1" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-OPENSEARCH-12.control\"}","dist_request_id":"1328593.1526.16147010700267289","index":"12","strategy":"OPENSEARCH","dest":"https://blog.csdn.net/lmseo5hy/article/details/79914670"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-OPENSEARCH-12.control&dist_request_id=1328593.1526.16147010700267289&depth_1-utm_source=distribute.pc_relevant.none-task-blog-OPENSEARCH-12.control'>
					<em>python</em>开发软件有哪些？<em>Python</em>编程软件
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/lmseo5hy" target="_blank"><span class="blog-title">lmseo5hy的博客</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">04-12</span>
					<span class="info-block read"><img class="read-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					2万+
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/lmseo5hy/article/details/79914670" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-OPENSEARCH-12.control\"}","dist_request_id":"1328593.1526.16147010700267289","index":"12","strategy":"OPENSEARCH","dest":"https://blog.csdn.net/lmseo5hy/article/details/79914670"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-OPENSEARCH-12.control&dist_request_id=1328593.1526.16147010700267289&depth_1-utm_source=distribute.pc_relevant.none-task-blog-OPENSEARCH-12.control'>
				<div class="desc ellipsis-online ellipsis-online-1"><em>Python</em>开发软件可根据其用途不同分为两种，一种是<em>Python</em>代码编辑器，一种是<em>Python</em>集成开发工具，两者的配合使用可以极大的提高<em>Python</em>开发人员的编程效率，以下是常用的几款<em>Python</em>代码编辑器和<em>Python</em>集成开发工具。一、<em>Python</em>代码编辑器1. SublimeTextSublime Text是一款非常流行的代码编辑器，支持<em>Python</em>代码编辑，同时兼容所有平台，并且丰富的插件扩...</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/lmseo5hy/article/details/81740339"  data-report-view='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-OPENSEARCH-13.control\"}","dist_request_id":"1328593.1526.16147010700267289","index":"13","strategy":"OPENSEARCH","dest":"https://blog.csdn.net/lmseo5hy/article/details/81740339"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/lmseo5hy/article/details/81740339" class="tit ellipsis-online ellipsis-online-1" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-OPENSEARCH-13.control\"}","dist_request_id":"1328593.1526.16147010700267289","index":"13","strategy":"OPENSEARCH","dest":"https://blog.csdn.net/lmseo5hy/article/details/81740339"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-OPENSEARCH-13.control&dist_request_id=1328593.1526.16147010700267289&depth_1-utm_source=distribute.pc_relevant.none-task-blog-OPENSEARCH-13.control'>
					<em>Python</em>爬虫的用途
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/lmseo5hy" target="_blank"><span class="blog-title">lmseo5hy的博客</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">08-16</span>
					<span class="info-block read"><img class="read-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					2万+
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/lmseo5hy/article/details/81740339" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-OPENSEARCH-13.control\"}","dist_request_id":"1328593.1526.16147010700267289","index":"13","strategy":"OPENSEARCH","dest":"https://blog.csdn.net/lmseo5hy/article/details/81740339"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-OPENSEARCH-13.control&dist_request_id=1328593.1526.16147010700267289&depth_1-utm_source=distribute.pc_relevant.none-task-blog-OPENSEARCH-13.control'>
				<div class="desc ellipsis-online ellipsis-online-1"><em>Python</em>爬虫是用<em>Python</em>编程<em>语言</em>实现的网络爬虫，主要用于网络数据的抓取和处理，相比于其他<em>语言</em>，<em>Python</em>是一门非常适合开发网络爬虫的编程<em>语言</em>，大量内置包，可以轻松实现网络爬虫功能。

<em>Python</em>爬虫可以做的事情很多，如搜索引擎、采集数据、广告过滤等，<em>Python</em>爬虫还可以用于数据分析，在数据的抓取方面可以作用巨大！

<em>Python</em>爬虫架构组成

1. URL管理器：管理待爬取的url集...</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_course clearfix" data-url="https://edu.csdn.net/course/detail/26676"  data-report-view='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-course-OPENSEARCH-14.control\"}","dist_request_id":"1328593.1526.16147010700267289","index":"14","strategy":"OPENSEARCH","dest":"https://edu.csdn.net/course/detail/26676"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://edu.csdn.net/course/detail/26676" class="tit ellipsis-online ellipsis-online-1" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-course-OPENSEARCH-14.control\"}","dist_request_id":"1328593.1526.16147010700267289","index":"14","strategy":"OPENSEARCH","dest":"https://edu.csdn.net/course/detail/26676"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-course-OPENSEARCH-14.control&dist_request_id=1328593.1526.16147010700267289&depth_1-utm_source=distribute.pc_relevant.none-task-course-OPENSEARCH-14.control'>
					零基础掌握 <em>Python</em> 入门到实战
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info display-flex">
					<span class="info-block">11-08</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://edu.csdn.net/course/detail/26676" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-course-OPENSEARCH-14.control\"}","dist_request_id":"1328593.1526.16147010700267289","index":"14","strategy":"OPENSEARCH","dest":"https://edu.csdn.net/course/detail/26676"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-course-OPENSEARCH-14.control&dist_request_id=1328593.1526.16147010700267289&depth_1-utm_source=distribute.pc_relevant.none-task-course-OPENSEARCH-14.control'>
				<div class="desc ellipsis-online ellipsis-online-1">
	  


	
		  
	
	
		【为什么学<em>Python</em>】 
	
	
		 
	
	
		<em>Python</em> 是当今非常热门的<em>语言</em>之一，2020年的 TIOBE 编程<em>语言</em>排行榜中 ，<em>Python</em>名列第一，并且其流行度依然处在上升势头。 
	


	 


	在2015年的时候，在网上还经常看到学<em>Python</em>还是学R的讨论，那时候老齐就选择了<em>Python</em>，并且开始着手出版《跟老齐学<em>Python</em>》。时至今日，已经无需争论。<em>Python</em>给我们带来的，不仅仅是项目上的收益，我们更可以从它&ldquo;开放、简洁&rdquo;哲学观念中得到技术发展路线的启示。 


	


	借此机会，老齐联合CSDN推出了本课程，希望能影响更多的人走进<em>Python</em>，踏入编程的大门。 


	
 


	  


	
		【课程设计】 
	
	
		
 
	
	
		本课程共包含三大模块： 
	


	
 


	一、基础知识篇 


	内置对象和基本的运算、语句，是<em>Python</em><em>语言</em>的基础。本课程在讲解这部分知识的时候，不是简单地将各种知识做简单的堆砌，而是在兼顾内容的全面性的同时，更重视向学习者讲授掌握有关知识的方法，比如引导学习者如何排查错误、如何查看和理解文档等。 


	&nbsp; 


	二、面向对象篇 


	&ldquo;面向对象（OOP）&rdquo;是目前企业开发主流的开发方式，本课程从一开始就渗透这种思想，并且在&ldquo;函数&rdquo;和&ldquo;类&rdquo;的学习中强化面向对象开发方式的学习&mdash;&mdash;这是本课程与一般课程的重要区别，一般的课程只在&ldquo;类&rdquo;这里才提到&ldquo;对象&rdquo;，会导致学习者茫然失措，并生畏惧，乃至于放弃学习。本课程则是从开始以&ldquo;润物细无声&rdquo;的方式，渗透对象概念，等学习到本部分的时候，OOP对学习者而言有一种&ldquo;水到渠成&rdquo;的感觉。 


	&nbsp; 


	三、工具实战篇 


	在项目实战中，除了前述的知识之外，还会用到很多其他工具，至于那些工具如何安装？怎么自己做工具？有那些典型工具？都是这部分的内容。具体来说，就是要在这部分<em>介绍</em><em>Python</em>标准库的应用以及第三方包的安装，还有如何开发和发布自己的工具包。此外，很多学习<em>Python</em>的同学，未来要么从事数据科学、要么从事Web开发，不论哪个方向，都离不开对数据库的操作，本部分还会从实战的角度，<em>介绍</em>如何用<em>Python</em><em>语言</em>操作常用数据库。 


	


	 
</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/weixin_40264772/article/details/101599365"  data-report-view='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-OPENSEARCH-15.control\"}","dist_request_id":"1328593.1526.16147010700267289","index":"15","strategy":"OPENSEARCH","dest":"https://blog.csdn.net/weixin_40264772/article/details/101599365"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/weixin_40264772/article/details/101599365" class="tit ellipsis-online ellipsis-online-1" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-OPENSEARCH-15.control\"}","dist_request_id":"1328593.1526.16147010700267289","index":"15","strategy":"OPENSEARCH","dest":"https://blog.csdn.net/weixin_40264772/article/details/101599365"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-OPENSEARCH-15.control&dist_request_id=1328593.1526.16147010700267289&depth_1-utm_source=distribute.pc_relevant.none-task-blog-OPENSEARCH-15.control'>
					<em>Python</em>中如何求列表list的平均数
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/weixin_40264772" target="_blank"><span class="blog-title">weixin_40264772的博客</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">09-28</span>
					<span class="info-block read"><img class="read-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					11万+
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/weixin_40264772/article/details/101599365" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-OPENSEARCH-15.control\"}","dist_request_id":"1328593.1526.16147010700267289","index":"15","strategy":"OPENSEARCH","dest":"https://blog.csdn.net/weixin_40264772/article/details/101599365"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-OPENSEARCH-15.control&dist_request_id=1328593.1526.16147010700267289&depth_1-utm_source=distribute.pc_relevant.none-task-blog-OPENSEARCH-15.control'>
				<div class="desc ellipsis-online ellipsis-online-1"><em>Python</em>中如何求列表list的平均数
当列表list中只包含数字时，如何求取它的平均数：
from numpy import *
a = [52,69,35,65,89,15,34]
b = mean(a)
print(b)

运行结果:
51.285714285714285


...</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/smxjant/article/details/93614544"  data-report-view='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-OPENSEARCH-16.control\"}","dist_request_id":"1328593.1526.16147010700267289","index":"16","strategy":"OPENSEARCH","dest":"https://blog.csdn.net/smxjant/article/details/93614544"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/smxjant/article/details/93614544" class="tit ellipsis-online ellipsis-online-1" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-OPENSEARCH-16.control\"}","dist_request_id":"1328593.1526.16147010700267289","index":"16","strategy":"OPENSEARCH","dest":"https://blog.csdn.net/smxjant/article/details/93614544"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-OPENSEARCH-16.control&dist_request_id=1328593.1526.16147010700267289&depth_1-utm_source=distribute.pc_relevant.none-task-blog-OPENSEARCH-16.control'>
					<em>Python</em>基础教程，<em>Python</em>入门教程（非常详细）
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/smxjant" target="_blank"><span class="blog-title">xjanting的博客</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">06-25</span>
					<span class="info-block read"><img class="read-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					13万+
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/smxjant/article/details/93614544" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-OPENSEARCH-16.control\"}","dist_request_id":"1328593.1526.16147010700267289","index":"16","strategy":"OPENSEARCH","dest":"https://blog.csdn.net/smxjant/article/details/93614544"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-OPENSEARCH-16.control&dist_request_id=1328593.1526.16147010700267289&depth_1-utm_source=distribute.pc_relevant.none-task-blog-OPENSEARCH-16.control'>
				<div class="desc ellipsis-online ellipsis-online-1">第1章 <em>Python</em>编程基础

1.编程<em>语言</em>是什么

2.编译型<em>语言</em>和解释型<em>语言</em>

3.<em>Python</em>是什么

4.<em>Python</em>具有哪些特点（优点和缺点）

5.学<em>Python</em>，不需要有编程基础！

6.学<em>Python</em>能干什么

7.<em>Python</em> 2.x和<em>Python</em> 3.x，初学者应如何选择？

8.<em>Python</em> 3和<em>Python</em> 2的区别

9.<em>Python</em> 2to3：自动将<em>Python</em> 2.x...</div>
			</a>
		</div>
	</div>
</div>
            </div>
            <div class="template-box">
                <span>©️2020 CSDN</span>
                <span>皮肤主题: 书香水墨</span>
                <span> 设计师:CSDN官方博客</span>
                <span>
                    <a href="https://blog.csdn.net/" class="back-home c-blue c-blue-hover c-blue-focus">返回首页</a>
                </span>
            </div>
<div class="blog-footer-bottom" style="margin-top:10px;"></div>
<script src="https://g.csdnimg.cn/common/csdn-footer/csdn-footer.js" data-isfootertrack="false" type="text/javascript"></script>
<script type="text/javascript">
    window.csdn.csdnFooter.options = {
        el: '.blog-footer-bottom',
        type: 2
    }
</script>        </main>
<aside class="blog_container_aside">
    <div id="asideProfile" class="aside-box">
    <div class="profile-intro d-flex">
        <div class="avatar-box d-flex justify-content-center flex-column">
            <a href="https://fuhanghang.blog.csdn.net" data-report-click='{"mod":"popu_379","spm":"1001.2101.3001.4121","dest":"https://fuhanghang.blog.csdn.net","ab":"new"}'>
                <img src="https://profile.csdnimg.cn/8/9/9/3_fuhanghang" class="avatar_pic">
            </a>
        </div>
        <div class="user-info d-flex flex-column profile-intro-name-box">
            <div class="profile-intro-name-boxTop">
                <a href="https://fuhanghang.blog.csdn.net" class="" id="uid" title="顺其自然~" data-report-click='{"mod":"popu_379","spm":"1001.2101.3001.4122","dest":"https://fuhanghang.blog.csdn.net","ab":"new"}'>
                    <span class="name vip-name" username="fuhanghang">顺其自然~</span>
                </a>
                <span>
                <img class="identity" src="https://csdnimg.cn/release/blogv2/dist/mobile/img/vipNew.png" alt="">
                </span>
                <span class="flag expert-blog">
                <span class="bubble">CSDN认证博客专家</span>
                </span>
                <span class="flag company-blog">
                <span class="bubble">CSDN认证企业博客</span>
                </span>
            </div>
            <div class="profile-intro-name-boxFooter">
                <span class="personal-home-page personal-home-years">码龄13年</span>
                    <span class="personal-home-page">
                    <a class="personal-home-certification" href="https://i.csdn.net/#/uc/profile?utm_source=14998968" target="_blank" title="暂无认证">
                    <img src="https://csdnimg.cn/identity/nocErtification.png" alt="">
                    暂无认证
                    </a>
                    </span>
            </div>
        </div>
    </div>
    <div class="data-info d-flex item-tiling">
        <dl class="text-center" title="241">
            <a href="https://fuhanghang.blog.csdn.net" data-report-click='{"mod":"1598321000_001","spm":"1001.2101.3001.4310"}' data-report-query="t=1">  
                <dt><span class="count">241</span></dt>
                <dd class="font">原创</dd>
            </a>
        </dl>
        <dl class="text-center" data-report-click='{"mod":"1598321000_002","spm":"1001.2101.3001.4311"}' title="909">
            <a href="https://blog.csdn.net/rank/writing_rank" target="_blank">
                <dt><span class="count">909</span></dt>
                <dd class="font">周排名</dd>
            </a>
        </dl>
        <dl class="text-center" title="3115">
            <a href="https://blog.csdn.net/rank/writing_rank_total" data-report-click='{"mod":"1598321000_003","spm":"1001.2101.3001.4312"}' target="_blank">
                <dt><span class="count">3115</span></dt>
                <dd class="font">总排名</dd>
            </a>
        </dl>
        <dl class="text-center" style="min-width:58px" title="1204769">  
            <dt><span class="count">120万+</span></dt>
            <dd>访问</dd>
        </dl>
        <dl class="text-center" title="7级,点击查看等级说明">
            <dt><a href="https://blog.csdn.net/home/help.html#level" target="_blank">
                <img class="level" src="https://csdnimg.cn/identity/blog7.png">
            </a>
            </dt>
            <dd>等级</dd>
        </dl>
    </div>
    <div class="item-rank"></div>
    <div class="data-info d-flex item-tiling">
        <dl class="text-center" title="12005">
            <dt><span class="count">1万+</span></dt>
            <dd>积分</dd>
        </dl>
         <dl class="text-center" id="fanBox" title="443">
            <dt><span class="count" id="fan">443</span></dt>
            <dd>粉丝</dd>
        </dl>
        <dl class="text-center" title="1131">
            <dt><span class="count">1131</span></dt>
            <dd>获赞</dd>
        </dl>
        <dl class="text-center" title="152">
            <dt><span class="count">152</span></dt>
            <dd>评论</dd>
        </dl>
        <dl class="text-center" title="2714">
            <dt><span class="count">2714</span></dt>
            <dd>收藏</dd>
        </dl>
    </div>
    <div class="aside-box-footer" data-report-view='{"spm":"3001.4296"}'>
        <div class="badge-box d-flex">
            <div class="badge d-flex">
                <div class="icon-badge" title="签到王者">
                    <div class="mouse-box">
                        <img class="medal-img" data-report-click='{"spm":"3001.4296"}' src="https://csdnimg.cn/medal/qiandao300@240.png" alt="签到王者">
                    </div>
                </div>
                <div class="icon-badge" title="持之以恒">
                    <div class="mouse-box">
                        <img class="medal-img" data-report-click='{"spm":"3001.4296"}' src="https://csdnimg.cn/medal/chizhiyiheng@240.png" alt="持之以恒">
                    </div>
                </div>
                <div class="icon-badge" title="1024勋章">
                    <div class="mouse-box">
                        <img class="medal-img" data-report-click='{"spm":"3001.4296"}' src="https://csdnimg.cn/medal/1024@240.png" alt="1024勋章">
                    </div>
                </div>
                <div class="icon-badge" title="勤写标兵Lv4">
                    <div class="mouse-box">
                        <img class="medal-img" data-report-click='{"spm":"3001.4296"}' src="https://csdnimg.cn/medal/qixiebiaobing4@240.png" alt="勤写标兵Lv4">
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="profile-intro-name-boxOpration">
        <div class="opt-letter-watch-box">
        <a class="bt-button personal-letter" href="https://im.csdn.net/chat/fuhanghang" target="_blank" rel="noopener">私信</a>
        </div>
        <div class="opt-letter-watch-box"> 
            <a class="personal-watch bt-button" id="btnAttent" >关注</a>  
        </div>
    </div>
</div>
<div id="asideSearchArticle" class="aside-box">
	<div class="aside-content search-comter">
    <div class="aside-search aside-search-blog">         
        <input type="text" class="input-serch-blog" name="" autocomplete="off" value="" id="search-blog-words" placeholder="搜博主文章">
        <a class="btn-search-blog">
                    <img src="//csdnimg.cn/cdn/content-toolbar/csdn-sou.png?v=1587021042">
        </a>
    </div>
    </div>
</div>


<div id="asideHotArticle" class="aside-box">
	<h3 class="aside-title">热门文章</h3>
	<div class="aside-content">
		<ul class="hotArticle-list">
			<li>
				<a href="https://fuhanghang.blog.csdn.net/article/details/97231803" target="_blank"  data-report-click='{"mod":"popu_541","spm":"1001.2101.3001.4139","dest":"https://fuhanghang.blog.csdn.net/article/details/97231803","ab":"new"}'>
				4款最好用的虚拟机软件简介及对比
					<img src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					<span class="read">76708</span>
                </a>
			</li>
			<li>
				<a href="https://fuhanghang.blog.csdn.net/article/details/83720495" target="_blank"  data-report-click='{"mod":"popu_541","spm":"1001.2101.3001.4139","dest":"https://fuhanghang.blog.csdn.net/article/details/83720495","ab":"new"}'>
				接入层、汇聚层、核心层交换机三者之间的功能详解
					<img src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					<span class="read">55242</span>
                </a>
			</li>
			<li>
				<a href="https://fuhanghang.blog.csdn.net/article/details/83690105" target="_blank"  data-report-click='{"mod":"popu_541","spm":"1001.2101.3001.4139","dest":"https://fuhanghang.blog.csdn.net/article/details/83690105","ab":"new"}'>
				七款非常好用的电脑数据恢复软件推荐
					<img src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					<span class="read">51956</span>
                </a>
			</li>
			<li>
				<a href="https://fuhanghang.blog.csdn.net/article/details/84260199" target="_blank"  data-report-click='{"mod":"popu_541","spm":"1001.2101.3001.4139","dest":"https://fuhanghang.blog.csdn.net/article/details/84260199","ab":"new"}'>
				什么是汇编语言
					<img src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					<span class="read">48167</span>
                </a>
			</li>
			<li>
				<a href="https://fuhanghang.blog.csdn.net/article/details/84064530" target="_blank"  data-report-click='{"mod":"popu_541","spm":"1001.2101.3001.4139","dest":"https://fuhanghang.blog.csdn.net/article/details/84064530","ab":"new"}'>
				哈佛结构和冯·诺依曼结构的区别
					<img src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					<span class="read">42673</span>
                </a>
			</li>
		</ul>
	</div>
</div>
<div id="asideNewComments" class="aside-box">
    <h3 class="aside-title">最新评论</h3>
    <div class="aside-content">
        <ul class="newcomment-list">
            <li>
                <a class="title text-truncate" target="_blank" href="https://fuhanghang.blog.csdn.net/article/details/83932784#comments_15192552" data-report-click='{"mod":"popu_542","spm":"1001.2101.3001.4231","dest":"https://fuhanghang.blog.csdn.net/article/details/83932784#comments_15192552","ab":"new"}' data-report-view='{"mod":"popu_542","spm":"1001.2101.3001.4231","dest":"https://fuhanghang.blog.csdn.net/article/details/83932784#comments_15192552","ab":"new"}'>软考与职称详解</a>
                <p class="comment ellipsis">
                    <a href="https://blog.csdn.net/bil130017" class="user-name" target="_blank">bil130017: </a>
                    <span class="code-comments">很详细，</span>
                </p>
            </li>
            <li>
                <a class="title text-truncate" target="_blank" href="https://fuhanghang.blog.csdn.net/article/details/106859295#comments_15182916" data-report-click='{"mod":"popu_542","spm":"1001.2101.3001.4231","dest":"https://fuhanghang.blog.csdn.net/article/details/106859295#comments_15182916","ab":"new"}' data-report-view='{"mod":"popu_542","spm":"1001.2101.3001.4231","dest":"https://fuhanghang.blog.csdn.net/article/details/106859295#comments_15182916","ab":"new"}'>vs2010 nuget 基础连接已经关闭:发送时发生错误</a>
                <p class="comment ellipsis">
                    <a href="https://fuhanghang.blog.csdn.net" class="user-name" target="_blank">顺其自然~: </a>
                    <span class="code-comments">保存为.reg格式，双击即可</span>
                </p>
            </li>
            <li>
                <a class="title text-truncate" target="_blank" href="https://fuhanghang.blog.csdn.net/article/details/106859295#comments_15176315" data-report-click='{"mod":"popu_542","spm":"1001.2101.3001.4231","dest":"https://fuhanghang.blog.csdn.net/article/details/106859295#comments_15176315","ab":"new"}' data-report-view='{"mod":"popu_542","spm":"1001.2101.3001.4231","dest":"https://fuhanghang.blog.csdn.net/article/details/106859295#comments_15176315","ab":"new"}'>vs2010 nuget 基础连接已经关闭:发送时发生错误</a>
                <p class="comment ellipsis">
                    <a href="https://blog.csdn.net/m0_51402871" class="user-name" target="_blank">m0_51402871: </a>
                    <span class="code-comments">大哥们双击导入怎么操作</span>
                </p>
            </li>
            <li>
                <a class="title text-truncate" target="_blank" href="https://fuhanghang.blog.csdn.net/article/details/113917278#comments_15130625" data-report-click='{"mod":"popu_542","spm":"1001.2101.3001.4231","dest":"https://fuhanghang.blog.csdn.net/article/details/113917278#comments_15130625","ab":"new"}' data-report-view='{"mod":"popu_542","spm":"1001.2101.3001.4231","dest":"https://fuhanghang.blog.csdn.net/article/details/113917278#comments_15130625","ab":"new"}'>depot_tools</a>
                <p class="comment ellipsis">
                    <a href="https://blog.csdn.net/ma2595162349" class="user-name" target="_blank">晨梦思雨: </a>
                    <span class="code-comments">原创不易，博主加油</span>
                </p>
            </li>
            <li>
                <a class="title text-truncate" target="_blank" href="https://fuhanghang.blog.csdn.net/article/details/106859295#comments_15125587" data-report-click='{"mod":"popu_542","spm":"1001.2101.3001.4231","dest":"https://fuhanghang.blog.csdn.net/article/details/106859295#comments_15125587","ab":"new"}' data-report-view='{"mod":"popu_542","spm":"1001.2101.3001.4231","dest":"https://fuhanghang.blog.csdn.net/article/details/106859295#comments_15125587","ab":"new"}'>vs2010 nuget 基础连接已经关闭:发送时发生错误</a>
                <p class="comment ellipsis">
                    <a href="https://blog.csdn.net/qq_43625360" class="user-name" target="_blank">qq_43625360: </a>
                    <span class="code-comments">你们解决了吗？我的还是基础连接失败</span>
                </p>
            </li>
        </ul>
    </div>
</div>
<div id="asideArchive" class="aside-box" style=" width:300px;">
    <h3 class="aside-title">最新文章</h3>
    <div class="aside-content">
        <ul class="inf_list clearfix">
            <li class="clearfix">
            <a href="https://fuhanghang.blog.csdn.net/article/details/114275775" target="_blank" data-report-click='{"mod":"popu_382","spm":"1001.2101.3001.4136","dest":"https://fuhanghang.blog.csdn.net/article/details/114275775","ab":"new"}' data-report-view='{"mod":"popu_382","dest":"https://fuhanghang.blog.csdn.net/article/details/114275775","ab":"new"}'>MFC RichEdit使用方法</a>
            </li>
            <li class="clearfix">
            <a href="https://fuhanghang.blog.csdn.net/article/details/114142075" target="_blank" data-report-click='{"mod":"popu_382","spm":"1001.2101.3001.4136","dest":"https://fuhanghang.blog.csdn.net/article/details/114142075","ab":"new"}' data-report-view='{"mod":"popu_382","dest":"https://fuhanghang.blog.csdn.net/article/details/114142075","ab":"new"}'>cef / JavaScript集成</a>
            </li>
            <li class="clearfix">
            <a href="https://fuhanghang.blog.csdn.net/article/details/114141017" target="_blank" data-report-click='{"mod":"popu_382","spm":"1001.2101.3001.4136","dest":"https://fuhanghang.blog.csdn.net/article/details/114141017","ab":"new"}' data-report-view='{"mod":"popu_382","dest":"https://fuhanghang.blog.csdn.net/article/details/114141017","ab":"new"}'>VS2019安装 VisualSVN Server 插件</a>
            </li>
        </ul>
        <div class="archive-bar"></div>
        <div class="archive-box">
                <div class="archive-title">2021</div> 
                <div class="archive-content">
                    <div class="archive-item">
                        <a href="https://fuhanghang.blog.csdn.net/article/month/2021/03" target="_blank" data-report-click='{"mod":"popu_538","spm":"1001.2101.3001.4138","ab":"new","dest":"https://fuhanghang.blog.csdn.net/article/month/2021/03"}'>
                        <span class="time">03月</span>
                        <span class="count">1篇</span>
                        </a>
                    </div>
                    <div class="archive-item">
                        <a href="https://fuhanghang.blog.csdn.net/article/month/2021/02" target="_blank" data-report-click='{"mod":"popu_538","spm":"1001.2101.3001.4138","ab":"new","dest":"https://fuhanghang.blog.csdn.net/article/month/2021/02"}'>
                        <span class="time">02月</span>
                        <span class="count">30篇</span>
                        </a>
                    </div>
                    <div class="archive-item">
                        <a href="https://fuhanghang.blog.csdn.net/article/month/2021/01" target="_blank" data-report-click='{"mod":"popu_538","spm":"1001.2101.3001.4138","ab":"new","dest":"https://fuhanghang.blog.csdn.net/article/month/2021/01"}'>
                        <span class="time">01月</span>
                        <span class="count">47篇</span>
                        </a>
                    </div>
                </div>
                <div class="archive-list-item"><a href="https://fuhanghang.blog.csdn.net/article/month/2020/12" target="_blank" data-report-click='{"mod":"popu_538","spm":"1001.2101.3001.4138","ab":"new","dest":""}'><span class="year">2020年</span><span class="num">333篇</span></a></div>
                <div class="archive-list-item"><a href="https://fuhanghang.blog.csdn.net/article/month/2019/12" target="_blank" data-report-click='{"mod":"popu_538","spm":"1001.2101.3001.4138","ab":"new","dest":""}'><span class="year">2019年</span><span class="num">103篇</span></a></div>
                <div class="archive-list-item"><a href="https://fuhanghang.blog.csdn.net/article/month/2018/12" target="_blank" data-report-click='{"mod":"popu_538","spm":"1001.2101.3001.4138","ab":"new","dest":""}'><span class="year">2018年</span><span class="num">165篇</span></a></div>
        </div>
    </div>
</div>
	<div id="footerRightAds" class="isShowFooterAds">
		<div class="aside-box">
			<div id="kp_box_57" data-pid="57"><script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- PC-博客详情页-左下视窗（300*600） -->
<ins class="adsbygoogle"
     style="display:block"
     data-ad-client="ca-pub-1076724771190722"
     data-ad-slot="1173711872"
     data-ad-format="auto"
     data-full-width-responsive="true"></ins>
<script>
     (adsbygoogle = window.adsbygoogle || []).push({});
</script><img class="pre-img-lasy" data-src="https://kunyu.csdn.net/1.png?p=57&a=2488&c=0&k=&spm=1001.2101.3001.5001&d=1&t=3&u=cafc3fceea104b4da73c8348a32b69a0" style="display: block;width: 0px;height: 0px;"></div>
		</div>
	</div>
    <!-- 详情页显示目录 -->
<!--文章目录-->
<div id="asidedirectory" class="aside-box">
    <div class='groupfile' id="directory">
        <h3 class="aside-title">目录</h3>
        <div class="align-items-stretch group_item">
            <div class="pos-box">
            <div class="scroll-box">
                <div class="toc-box"></div>
            </div>
            </div>
        </div>
    </div>
</div>
</aside>
<script>
	$("a.flexible-btn").click(function(){
		$(this).parents('div.aside-box').removeClass('flexible-box');
		$(this).parents("p.text-center").remove();
	})
</script>
<script type="text/javascript"  src="https://g.csdnimg.cn/user-tooltip/2.4/user-tooltip.js"></script>
<script type="text/javascript"  src="https://g.csdnimg.cn/user-medal/1.0.6/user-medal.js"></script>    </div>
<div class="recommend-right  align-items-stretch clearfix" id="rightAside" data-type="recommend">
    <aside class="recommend-right_aside">
        <div id="recommend-right" >
                        <div class='flex-column aside-box groupfile' id="groupfile">
                <div class="groupfile-div">
                <h3 class="aside-title">目录</h3>
                <div class="align-items-stretch group_item">
                    <div class="pos-box">
                        <div class="scroll-box">
                            <div class="toc-box"></div>
                        </div>
                    </div>
                </div>
                </div>
            </div>
                <div id="recommendAdBox">
                    <div id="kp_box_479" data-pid="479"><script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- PC-博客详情页-右侧视窗300*600 -->
<ins class="adsbygoogle"
     style="display:block"
     data-ad-client="ca-pub-1076724771190722"
     data-ad-slot="8441704093"
     data-ad-format="auto"
     data-full-width-responsive="true"></ins>
<script>
     (adsbygoogle = window.adsbygoogle || []).push({});
</script><img class="pre-img-lasy" data-src="https://kunyu.csdn.net/1.png?p=479&a=2487&c=0&k=&spm=1001.2101.3001.4834&d=1&t=3&u=e237fd3670c44095a88178a1004c99e0" style="display: block;width: 0px;height: 0px;"></div>
                </div>
<div id="asideArchive" class="aside-box" style=" width:300px;">
    <h3 class="aside-title">最新文章</h3>
    <div class="aside-content">
        <ul class="inf_list clearfix">
            <li class="clearfix">
            <a href="https://fuhanghang.blog.csdn.net/article/details/114275775" target="_blank" data-report-click='{"mod":"popu_382","spm":"1001.2101.3001.4136","dest":"https://fuhanghang.blog.csdn.net/article/details/114275775","ab":"new"}' data-report-view='{"mod":"popu_382","dest":"https://fuhanghang.blog.csdn.net/article/details/114275775","ab":"new"}'>MFC RichEdit使用方法</a>
            </li>
            <li class="clearfix">
            <a href="https://fuhanghang.blog.csdn.net/article/details/114142075" target="_blank" data-report-click='{"mod":"popu_382","spm":"1001.2101.3001.4136","dest":"https://fuhanghang.blog.csdn.net/article/details/114142075","ab":"new"}' data-report-view='{"mod":"popu_382","dest":"https://fuhanghang.blog.csdn.net/article/details/114142075","ab":"new"}'>cef / JavaScript集成</a>
            </li>
            <li class="clearfix">
            <a href="https://fuhanghang.blog.csdn.net/article/details/114141017" target="_blank" data-report-click='{"mod":"popu_382","spm":"1001.2101.3001.4136","dest":"https://fuhanghang.blog.csdn.net/article/details/114141017","ab":"new"}' data-report-view='{"mod":"popu_382","dest":"https://fuhanghang.blog.csdn.net/article/details/114141017","ab":"new"}'>VS2019安装 VisualSVN Server 插件</a>
            </li>
        </ul>
        <div class="archive-bar"></div>
        <div class="archive-box">
                <div class="archive-title">2021</div> 
                <div class="archive-content">
                    <div class="archive-item">
                        <a href="https://fuhanghang.blog.csdn.net/article/month/2021/03" target="_blank" data-report-click='{"mod":"popu_538","spm":"1001.2101.3001.4138","ab":"new","dest":"https://fuhanghang.blog.csdn.net/article/month/2021/03"}'>
                        <span class="time">03月</span>
                        <span class="count">1篇</span>
                        </a>
                    </div>
                    <div class="archive-item">
                        <a href="https://fuhanghang.blog.csdn.net/article/month/2021/02" target="_blank" data-report-click='{"mod":"popu_538","spm":"1001.2101.3001.4138","ab":"new","dest":"https://fuhanghang.blog.csdn.net/article/month/2021/02"}'>
                        <span class="time">02月</span>
                        <span class="count">30篇</span>
                        </a>
                    </div>
                    <div class="archive-item">
                        <a href="https://fuhanghang.blog.csdn.net/article/month/2021/01" target="_blank" data-report-click='{"mod":"popu_538","spm":"1001.2101.3001.4138","ab":"new","dest":"https://fuhanghang.blog.csdn.net/article/month/2021/01"}'>
                        <span class="time">01月</span>
                        <span class="count">47篇</span>
                        </a>
                    </div>
                </div>
                <div class="archive-list-item"><a href="https://fuhanghang.blog.csdn.net/article/month/2020/12" target="_blank" data-report-click='{"mod":"popu_538","spm":"1001.2101.3001.4138","ab":"new","dest":""}'><span class="year">2020年</span><span class="num">333篇</span></a></div>
                <div class="archive-list-item"><a href="https://fuhanghang.blog.csdn.net/article/month/2019/12" target="_blank" data-report-click='{"mod":"popu_538","spm":"1001.2101.3001.4138","ab":"new","dest":""}'><span class="year">2019年</span><span class="num">103篇</span></a></div>
                <div class="archive-list-item"><a href="https://fuhanghang.blog.csdn.net/article/month/2018/12" target="_blank" data-report-click='{"mod":"popu_538","spm":"1001.2101.3001.4138","ab":"new","dest":""}'><span class="year">2018年</span><span class="num">165篇</span></a></div>
        </div>
    </div>
</div>
        </div>
    </aside>
</div>

</div>
<div class="mask-dark"></div>
<script type="text/javascript">
    var timert = setInterval(function(){
      sideToolbar = $(".csdn-side-toolbar");
      if (sideToolbar.length > 0) {
        sideToolbar.css('cssText','bottom:64px !important;')
        clearInterval(timert);
      }
    }, 200);
</script>
<script>
    var articleId = 84110701;
    var commentscount = 4;
    var curentUrl = "https://blog.csdn.net/fuhanghang/article/details/84110701";
    var myUrl = "https://my.csdn.net/";
    var highlight = ["python","语言","介绍"];//高亮数组
    var isRecommendModule = true;
    var isBaiduPre = false;
    var baiduCount = 2;
    var share_card_url = "https://blog.csdn.net/fuhanghang/article/shareArticleCardPage?article_id=84110701"
	var articleType = 1;
    var baiduKey = "python";
    var needInsertBaidu = true;
    var recommendRegularDomainArr = ["blog.csdn.net/.+/article/details/","download.csdn.net/download/","edu.csdn.net/course/detail/","ask.csdn.net/questions/","bbs.csdn.net/topics/","www.csdn.net/gather_.+/"]
    var codeStyle = "atom-one-dark";
    var baiduSearchType = "utm_term";
    var canRead = true;
    var blogMoveHomeArticle = false;
    var showPcWindowAd = false;
    var showSearchText = "secondText";
    var linkPage = true;
    var articleSource = 1;
    var articleReport = '{"pid": "blog", "spm":"1001.2101"}';
</script>
<script src="https://csdnimg.cn/public/sandalstrap/1.4/js/sandalstrap.min.js"></script>
<div class="skin-boxshadow"></div>
<div style="display:none;">
	<img src="" onerror='setTimeout(function(){if(!/(csdn.net|iteye.com|baiducontent.com|googleusercontent.com|360webcache.com|sogoucdn.com|bingj.com|baidu.com)$/.test(window.location.hostname)){window.location.href="\x68\x74\x74\x70\x73\x3a\x2f\x2f\x77\x77\x77\x2e\x63\x73\x64\x6e\x2e\x6e\x65\x74"}},3000);'>
</div>
</body>
    <!-- 富文本柱状图  -->
	<link rel="stylesheet" href="https://csdnimg.cn/release/blog_editor_html/release1.6.12/ckeditor/plugins/chart/chart.css"/>
	<script type="text/javascript" src="https://csdnimg.cn/release/blog_editor_html/release1.6.12/ckeditor/plugins/chart/lib/chart.min.js"></script>
    <script type="text/javascript" src="https://csdnimg.cn/release/blog_editor_html/release1.6.12/ckeditor/plugins/chart/widget2chart.js"></script>
<script src="https://csdnimg.cn/release/blogv2/dist/components/js/pc_wap_highlight-db1e81323a.min.js" type="text/javascript"></script>
<script src="https://csdnimg.cn/release/blogv2/dist/components/js/pc_wap_common-906586e915.min.js" type="text/javascript"></script>
<link rel="stylesheet" href="https://csdnimg.cn/release/blog_editor_html/release1.6.12/ckeditor/plugins/codesnippet/lib/highlight/styles/atom-one-dark.css">
<script>
 // 全局声明
 if (window.csdn === undefined) {
      window.csdn = {};
    }
    window.csdn.sideToolbar = {
        options: {
            report:{
                isShow: true,
            },
            qr: {
                isShow: false,
            },
            guide: {
                isShow: true
            }
        }
    }
    $(function(){
        $(document).on('click',"a.option-box[data-type='report']",function() {
            window.csdn.userLogin.loadAjax(function(res){
                showReport(false,articleTitles);
            })
        });
    })
</script>
    <script src="https://g.csdnimg.cn/baidu-search/1.0.9/baidu-search.js"  type="text/javascript"></script>
<script src="https://csdnimg.cn/release/download/old_static/js/qrcode.js"></script>
<script src="https://csdnimg.cn/release/blogv2/dist/pc/js/common-b286f966c8.min.js" type="text/javascript"></script>
<script src="https://csdnimg.cn/release/blogv2/dist/pc/js/detail-6a69ca4c78.min.js" type="text/javascript"></script>
<script src="https://g.csdnimg.cn/user-ordercart/1.0.6/user-ordercart.js" type="text/javascript"></script>
<script src="https://csdnimg.cn/release/blogv2/dist/pc/js/column-78261cfea6.min.js" type="text/javascript"></script>
<script src="https://g.csdnimg.cn/side-toolbar/3.0/side-toolbar.js" type="text/javascript"></script>
<script src="https://g.csdnimg.cn/copyright/1.0.3/copyright.js" type="text/javascript"></script>
<script>
    $(".MathJax").remove();
    if ($('div.markdown_views pre.prettyprint code.hljs').length > 0) {
        $('div.markdown_views')[0].className = 'markdown_views';
    }
</script>
<script type="text/javascript" src="https://csdnimg.cn/release/blog_mathjax/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script type="text/x-mathjax-config">
    MathJax.Hub.Config({
            "HTML-CSS": {
                    linebreaks: { automatic: true, width: "94%container" },
                    imageFont: null
            },
            tex2jax: {
                preview: "none"
            },
            mml2jax: {
                preview: 'none'
            }
    });
</script>
<script type="text/javascript" crossorigin src="https://g.csdnimg.cn/user-login/2.3.2/user-login.js"></script>
<script type="text/javascript" crossorigin src="https://g.csdnimg.cn/login-box/1.1.4/login-box.js"></script></html>
